# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
542685 | Stickfish | Nautilus (BOI19_nautilus) | C++17 | 288 ms | 1100 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 <iostream>
#include <bitset>
using namespace std;
const int MAXN = 501;
const int SZ = MAXN * MAXN;
bitset<SZ> empty_cell;
bitset<SZ> move_west;
bitset<SZ> move_east;
bitset<SZ> move_south;
bitset<SZ> ans;
signed main() {
int r, c, m;
cin >> r >> c >> m;
for (int i = 0; i < r; ++i) {
for (int j = 0; j < c; ++j) {
char ch;
cin >> ch;
empty_cell[i * c + j] = (ch == '.');
if (j)
move_west[i * c + j] = empty_cell[i * c + j] & empty_cell[i * c + j - 1];
}
}
for (int i = 0; i < r; ++i) {
for (int j = 0; j < c; ++j) {
if (j + 1 < c)
move_east[i * c + j] = empty_cell[i * c + j] & empty_cell[i * c + j + 1];
if (i + 1 < r)
move_south[i * c + j] = empty_cell[i * c + j] & empty_cell[i * c + j + c];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |