Submission #446737

#TimeUsernameProblemLanguageResultExecution timeMemory
446737fuad27Awesome Arrowland Adventure (eJOI19_adventure)C++14
0 / 100
0 ms204 KiB
#include<bits/stdc++.h> using namespace std; int main () { int n, m; cin >> m >> n; string s; cin >> s; for(int i = 0;i<n-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:9:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    9 |   if(s[i] == 'X')cout<<-1<<endl;return 0;
      |   ^~
adventure.cpp:9:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    9 |   if(s[i] == 'X')cout<<-1<<endl;return 0;
      |                                 ^~~~~~
#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...