Submission #10669605
Source Code Expand
Copy
#include<bits/stdc++.h>typedef long long ll;ll gi(){ll x=0,f=1;char ch=getchar();while(!isdigit(ch))f^=ch=='-',ch=getchar();while(isdigit(ch))x=x*10+ch-'0',ch=getchar();return f?x:-x;}std::mt19937 rnd(time(NULL));#define rand rnd#define pr std::pair<int,int>#define fi first#define se secondtemplate<class T>void cxk(T&a,T b){a=a>b?a:b;}template<class T>void cnk(T&a,T b){a=a<b?a:b;}#ifdef modint pow(int x,int y){int ret=1;while(y){if(y&1)ret=1ll*ret*x%mod;
#include<bits/stdc++.h> typedef long long ll; ll gi(){ ll x=0,f=1; char ch=getchar(); while(!isdigit(ch))f^=ch=='-',ch=getchar(); while(isdigit(ch))x=x*10+ch-'0',ch=getchar(); return f?x:-x; } std::mt19937 rnd(time(NULL)); #define rand rnd #define pr std::pair<int,int> #define fi first #define se second template<class T>void cxk(T&a,T b){a=a>b?a:b;} template<class T>void cnk(T&a,T b){a=a<b?a:b;} #ifdef mod int pow(int x,int y){ int ret=1; while(y){ if(y&1)ret=1ll*ret*x%mod; x=1ll*x*x%mod;y>>=1; } return ret; } template<class Ta,class Tb>void inc(Ta&a,Tb b){a=a+b>=mod?a+b-mod:a+b;} template<class Ta,class Tb>void dec(Ta&a,Tb b){a=a>=b?a-b:a+mod-b;} #endif char S[110]; int main(){ #ifdef LOCAL freopen("in.in","r",stdin); //freopen("out.out","w",stdout); #endif scanf("%s",S+1); int n=strlen(S+1); if(n&1)puts("No"); else{ bool flg=1; for(int i=1;i<=n;i+=2)flg&=S[i]=='h'; for(int i=2;i<=n;i+=2)flg&=S[i]=='i'; puts(flg?"Yes":"No"); } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Hitachi String |
User | test12345 |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 1028 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:35:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",S+1); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_01, 00_sample_02, 00_sample_03 |
All | 00_sample_01, 00_sample_02, 00_sample_03, 02_random_01, 02_random_02, 02_random_03, 02_random_04, 02_random_05, 90_handmake_01, 90_handmake_02, 90_handmake_03, 90_handmake_04, 90_handmake_05, 90_handmake_06, 90_handmake_07, 90_handmake_08, 90_handmake_09 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01 | AC | 1 ms | 256 KB |
00_sample_02 | AC | 1 ms | 256 KB |
00_sample_03 | AC | 1 ms | 256 KB |
02_random_01 | AC | 1 ms | 256 KB |
02_random_02 | AC | 1 ms | 256 KB |
02_random_03 | AC | 1 ms | 256 KB |
02_random_04 | AC | 1 ms | 256 KB |
02_random_05 | AC | 1 ms | 256 KB |
90_handmake_01 | AC | 1 ms | 256 KB |
90_handmake_02 | AC | 1 ms | 256 KB |
90_handmake_03 | AC | 1 ms | 256 KB |
90_handmake_04 | AC | 1 ms | 256 KB |
90_handmake_05 | AC | 1 ms | 256 KB |
90_handmake_06 | AC | 1 ms | 256 KB |
90_handmake_07 | AC | 1 ms | 256 KB |
90_handmake_08 | AC | 1 ms | 256 KB |
90_handmake_09 | AC | 1 ms | 256 KB |