Submission #446737

# Submission time Handle Problem Language Result Execution time Memory
446737 2021-07-23T07:49:22 Z fuad27 Awesome Arrowland Adventure (eJOI19_adventure) C++14
0 / 100
0 ms 204 KB
#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

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 time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -