Submission #199794

#TimeUsernameProblemLanguageResultExecution timeMemory
199794zoooma13Magnus (COCI18_magnus)C++14
50 / 50
12 ms504 KiB
#include <bits/stdc++.h> using namespace std; int main() { string s ,f = "HONI"; cin >> s; int idx = 0; for(int i=0; i<s.size(); i++) if(f[idx%4] == s[i]) idx++; cout << idx/4 << endl; }

Compilation message (stderr)

magnus.cpp: In function 'int main()':
magnus.cpp:9:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<s.size(); i++)
                  ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...