Submission #641066

#TimeUsernameProblemLanguageResultExecution timeMemory
641066ivazivaAwesome Arrowland Adventure (eJOI19_adventure)C++14
0 / 100
1 ms300 KiB
#include <bits/stdc++.h> using namespace std; int main() { long long n,m; cin>>n>>m; char matrica[n+10][m+10]; for (long long i=1;i<=n;i++) { for (long long j=1;j<=m;j++) { cin>>matrica[i][j]; } } long long rez=0; for (long long i=1;i<=m;i++) { if (matrica[1][i]=='X') { rez=-1; break; } else { if (matrica[1][i]=='N') rez++; else if (matrica[1][i]=='W') rez+=2; else if (matrica[1][i]=='S') rez+=3; } } cout<<rez<<endl; }
#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...