제출 #143292

#제출 시각아이디문제언어결과실행 시간메모리
143292grobarMagnus (COCI18_magnus)C++14
50 / 50
10 ms760 KiB
#include <iostream> using namespace std; int main() { string s; cin>>s; int pozicija=0; int k=0; for(int i=0;i<s.size();i++) { if(s[i]=='H' && pozicija==0) { pozicija++; } if(s[i]=='O' && pozicija==1) { pozicija++; } if(s[i]=='N' && pozicija==2) { pozicija++; } if(s[i]=='I' && pozicija==3) { pozicija++; } if(pozicija==4) { k++; pozicija=0; } } cout<<k<<endl; }

컴파일 시 표준 에러 (stderr) 메시지

magnus.cpp: In function 'int main()':
magnus.cpp:11:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0;i<s.size();i++)
                 ~^~~~~~~~~
#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...