Submission #889918

#TimeUsernameProblemLanguageResultExecution timeMemory
889918vjudge1Nautilus (BOI19_nautilus)C++17
0 / 100
1 ms348 KiB
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n,m,k,l,r,u,d,cnt; int main() { cin>>n>>m>>k; string s; char map[200][200]; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>map[i][j]; } } cin>>s; for(int i=0;i<k;i++){ if(s[i]=='N'){ u++; } if(s[i]=='S'){ d++; } if(s[i]=='W'){ l++; } else{ r++; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(map[i-l+r][j+u-d]=='.'){ cnt++; } } } cout<<cnt; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...