# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
128408 | MatesV13 | Magnus (COCI18_magnus) | C++11 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
string s, okk;
int ok, honi;
int main (){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> s;
okk = "HONI";
for (int i=0 ; i<s.size() ; i++){
if (s[i]==okk[ok]){
ok++;
if(ok==4){
ok=0;
honi++;
}
}
}
cout << honi;
return 0;
}