Submission #696956

#TimeUsernameProblemLanguageResultExecution timeMemory
696956DeepessonHomework (CEOI22_homework)C++17
13 / 100
152 ms14292 KiB
#include <bits/stdc++.h> int main() { ///subtask 3 int count=0; std::string s; std::cin>>s; int N=0; for(auto&x:s)if(x=='?')++N; char expected = s[1]; for(int i=0;i!=s.size();++i){ if(s[i]=='m'){ if(s[i+1]==expected)++count; else break; } } std::cout<<N-count<<"\n"; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:12:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |     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...