Submission #293118

#TimeUsernameProblemLanguageResultExecution timeMemory
2931187_7_7Magnus (COCI18_magnus)C++17
50 / 50
2 ms664 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); string s, t = "HONI"; cin >> s; int pos = 0; for(int i = 0; i < (int)s.size(); i ++){ if(s[i] == t[pos % 4]) pos ++; } cout << pos / 4 << "\n"; }
#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...