Submission #128436

# Submission time Handle Problem Language Result Execution time Memory
128436 2019-07-10T22:51:54 Z 44442 Magnus (COCI18_magnus) C++11
50 / 50
3 ms 760 KB
#include <bits/stdc++.h>
using namespace std;
int ok,i,n;
string s;
int main (){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
    cin>>s;
    n=s.size();
    while(i<n){
      while(i<n and s[i]!='H')i++;
      while(i<n and s[i]!='O')i++;
      while(i<n and s[i]!='N')i++;
      while(i<n and s[i]!='I')i++;
      if(i<n and s[i]=='I')ok++;
 }
cout<<ok;
return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 380 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 632 KB Output is correct
2 Correct 3 ms 632 KB Output is correct
3 Correct 3 ms 632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 632 KB Output is correct
2 Correct 3 ms 632 KB Output is correct
3 Correct 3 ms 632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 636 KB Output is correct
2 Correct 3 ms 760 KB Output is correct
3 Correct 3 ms 632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 632 KB Output is correct
2 Correct 3 ms 632 KB Output is correct
3 Correct 3 ms 632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 632 KB Output is correct
2 Correct 3 ms 636 KB Output is correct
3 Correct 3 ms 632 KB Output is correct