# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
633704 | devvops | Awesome Arrowland Adventure (eJOI19_adventure) | C++17 | 1 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define all(x) x.begin(), x.end()
#define speed ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define file freopen("palindrome.in", "r", stdin), freopen("palindrome.out", "w", stdout);
int main() {
speed;
int n, m, ans = 0;
cin >> n >> m;
char a[n + 10][m + 10];
bool f = 0;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> a[i][j];
if(a[i][j] == 'X' && j != m){
f = 1;
}
}
}
if(f){
cout << -1;
}
else{
cout << 0;
}
// for(int i = 1; i <= n; i++){
// if(a[i][1] == 'X' && i != n){
// cout << -1;
// return 0;
// }
// if(a[i][1] == 'E') ans++;
// else if(a[i][1] == 'S') ans = ans;
// else if(a[i][1] == 'W') ans += 3;
// else if(a[i][1] == 'N') ans += 2;
// }
// cout << ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |