Submission #94864

#TimeUsernameProblemLanguageResultExecution timeMemory
94864karlopuhMagnus (COCI18_magnus)C++14
50 / 50
6 ms632 KiB
#include <bits/stdc++.h> using namespace std; string ulaz; int brojac; int stanje=0; int main(){ cin>>ulaz; for(int i=0;i<ulaz.size();i++){ if(ulaz[i]=='H' && stanje==0){ stanje=1; } else if(ulaz[i]=='O' && stanje==1){ stanje=2; } else if(ulaz[i]=='N' && stanje==2){ stanje=3; } else if(ulaz[i]=='I' && stanje==3){ stanje=0; brojac++; } } cout<<brojac; }

Compilation message (stderr)

magnus.cpp: In function 'int main()':
magnus.cpp:10:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<ulaz.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...