| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1259588 | kevinkleindy | Awesome Arrowland Adventure (eJOI19_adventure) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, m;
int ans = 0;
cin>>n>>m;
for(int i = 0; i<n; i++){
string s;
cin>>s;
for(int j = 0; j<m; j++){
char cell = s[j];
if(i!=n-1 && j!=m-1 && cell == 'X'){
cout<<-1;
return 0;
}
if(cell == 'N'){
ans+=1;
} else if (cell == 'E'){
ans+=0;
} else if (cell == 'S'){
ans+=3;
} else if (cell == 'W'){
ans+=2;
}
}
}
cout<<ans;
}| # | 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... | ||||
