Submission #702401

#TimeUsernameProblemLanguageResultExecution timeMemory
702401chenyanMagnus (COCI18_magnus)C++17
50 / 50
2 ms596 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define pii pair<int,int> #define ff first #define ss second #define all(x) x.begin(),x.end() #define pb emplace_back #define N 200010 signed main(){ ios::sync_with_stdio(0); cin.tie(0); int res=0,ans=0; string s,t={"HONI"}; cin>>s; for(char c:s){ if(c==t[res])res++; if(res==4)ans++,res=0; } cout<<ans<<'\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...