제출 #542685

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5426852022-03-27 13:36:14StickfishNautilus (BOI19_nautilus)C++17
100 / 100
288 ms1100 KiB
#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];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...