Submission #287267

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2872672020-08-31 14:36:52Haunted_CppRectangles (IOI19_rect)C++17
13 / 100
623 ms441984 KiB
#include "rect.h"
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2500 + 5;
bool vis[MAX_N][MAX_N];
int R_max, R_min, C_max, C_min;
const int dr[] = {+1, -1, +0, +0};
const int dc[] = {+0, +0, +1, -1};
vector<vector<int>> mat;
int R, C;
int dfs(int r, int c) {
if (r <= 0 || c <= 0 || r >= R - 1 || c >= C - 1) {
return -2 * MAX_N * MAX_N;
}
R_min = min(R_min, r);
R_max = max(R_max, r);
C_min = min(C_min, c);
C_max = max(C_max, c);
vis[r][c] = 1;
int res = 1;
for (int i = 0; i < 4; i++) {
if (vis[r + dr[i]][c + dc[i]]) continue;
if (mat[r + dr[i]][c + dc[i]] > mat[r][c]) continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...