# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
393453 | inventiontime | Nautilus (BOI19_nautilus) | C++17 | 216 ms | 708 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
int R, C, M;
bitset<502> W[502] = {};
bitset<502> pos[2][502] = {};
queue<ii> pts;
string I;
int main() {
cin >> R >> C >> M;
char c;
for(int i = 1; i <= R; i++) for(int j = 1; j <= C; j++) {
cin >> c;
W[i][j] = c == '.';
pos[1][i][j] = W[i][j];
}
cin >> I;
for(int k = 0; k < M; k++)
for(int i = 1; i <= R; i++) {
switch(I[k]) {
case 'N':
pos[k % 2][i] = pos[(k % 2) ^ 1][i+1] & W[i];
break;
case 'S':
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |