Submission #922172

#TimeUsernameProblemLanguageResultExecution timeMemory
922172IsamMagnus (COCI18_magnus)C++17
20 / 50
1 ms724 KiB
#include<bits/stdc++.h> using namespace std; constexpr int sz = 1e5 + 6; string s; int h, o, n, i; signed main(){ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin >> s; int ans(0); for(register int j = 0; j < (int)s.size(); ++j){ h += s[j] == 'H'; o += s[j] == 'O'; n += s[j] == 'N'; i += s[j] == 'I'; if(h && o && n && i){ ++ans; h = o = n = i = 0; } } cout << ans << '\n'; return 0; }

Compilation message (stderr)

magnus.cpp: In function 'int main()':
magnus.cpp:14:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   14 |  for(register int j = 0; j < (int)s.size(); ++j){
      |                   ^
#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...