Submission #890008

#TimeUsernameProblemLanguageResultExecution timeMemory
890008vjudge1Nautilus (BOI19_nautilus)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> 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++; } else if(s[i]=='S'){ d++; } else if(s[i]=='W'){ l++; } else if(s[i]=='E'){ 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...