제출 #999858

#제출 시각아이디문제언어결과실행 시간메모리
999858vjudge1Awesome Arrowland Adventure (eJOI19_adventure)C++17
10 / 100
1 ms348 KiB
/* :) */ #include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long #define pll pair<ll, ll> char a[505][505]; int main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); ll n, m, cnt = 0; cin>>n>>m; for (ll i = 1; i<=n; i++){ for (ll j = 1; j<=m; j++){ cin>>a[i][j]; } } for (ll j = 1; j<=m-1; j++){ if (a[1][j] == 'X'){ cnt = -1; break; } if (a[1][j] == 'N') cnt += 2; else if (a[1][j] == 'W') cnt++; else if (a[1][j] == 'S') cnt += 3; } cout<<cnt; }
#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...