# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
622420 | Jomnoi | Rectangles (IOI19_rect) | C++17 | 5038 ms | 140296 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>
#include "rect.h"
using namespace std;
const int MAX_N = 2505;
const int d[4][2] = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}};
int N, M;
long long ans;
vector <vector <int>> A;
vector <vector <vector <bool>>> validRow, validCol;
int qs[MAX_N][MAX_N], dp[MAX_N];
bool visited[MAX_N][MAX_N];
long long count_rectangles(vector <vector <int>> a) {
N = a.size(), M = a[0].size();
A.resize(N + 1, vector <int> (M + 1, 0));
if(min(N, M) < 3) {
return 0;
}
for(int i = 0; i < N; i++) {
for(int j = 0; j < M; j++) {
A[i + 1][j + 1] = a[i][j];
}
}
if((N <= 700 and M <= 700) or (N <= 3 and M <= 2500)) {
validRow.resize(N + 1, vector <vector <bool>> (M + 1, vector <bool> (M + 1, false)));
validCol.resize(M + 1, vector <vector <bool>> (N + 1, vector <bool> (N + 1, false)));
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |