답안 #446735

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
446735 2021-07-23T07:47:07 Z fuad27 Awesome Arrowland Adventure (eJOI19_adventure) C++14
0 / 100
1 ms 204 KB
#include<bits/stdc++.h>
using namespace std;
int main () {
	int n, m;
	cin >> n >> m;
	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;
      |                                 ^~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -