#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 time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |