Submission #99372

#TimeUsernameProblemLanguageResultExecution timeMemory
99372kimcodingMagnus (COCI18_magnus)C++17
50 / 50
4 ms768 KiB
#include <cstdio> #include <iostream> #include <string> using namespace std; char c[4] = { 'H','O','N','I' }; int main() { ios::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int now = 0, ans = 0; for (auto& i : s) { if (i == c[now]) now++; if (now == 4) ans++, now = 0; } cout << ans << '\n'; return 0; }
#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...