Submission #446740

#TimeUsernameProblemLanguageResultExecution timeMemory
446740fuad27Awesome Arrowland Adventure (eJOI19_adventure)C++14
10 / 100
1 ms204 KiB
#include<bits/stdc++.h> using namespace std; int main () { int n, m;string s; cin>>n>>m>>s; for(int i=0;i<s.size()-1;i++){ if(s[i]=='X'){ cout<<-1<<endl; return 0; } } cout<<0<<endl; }

Compilation message (stderr)

adventure.cpp: In function 'int main()':
adventure.cpp:6:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    6 |  for(int i=0;i<s.size()-1;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...