Submission #1141037

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11410372025-01-28 03:02:31the_coding_poohFurniture (JOI20_furniture)C++20
100 / 100
174 ms11324 KiB
#include <bits/stdc++.h>
#define uwu return 0;
using namespace std;
const int SIZE = 1e3 + 5;
int cnt_depth[2 * SIZE];
bool able[SIZE][SIZE];
int cnt_pa[SIZE][SIZE], cnt_kid[SIZE][SIZE];
void init(int N, int M){
for (int i = 1; i <= N; i++){
for (int j = 1; j <= M; j++){
cin >> able[i][j];
able[i][j] ^= 1;
}
}
for (int i = 1; i <= N; i++){
for (int j = 1; j <= M; j++){
if(i != 1 || j != 1)
able[i][j] &= (able[i - 1][j] || able[i][j - 1]);
}
}
for (int i = N; i >= 1; i--){
for (int j = M; j >= 1; j--){
if(i != N || j != M)
able[i][j] &= (able[i + 1][j] || able[i][j + 1]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...