# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
843050 | nonono | Soccer Stadium (IOI23_soccer) | C++17 | 1545 ms | 584460 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 "soccer.h"
#include <bits/stdc++.h>
using namespace std;
const int mxN = 2000;
map<int, int> dp[mxN][mxN];
int full(int N, vector<vector<int>> F) {
vector<vector<int>> sum(N, vector<int> (N, 0));
for(int i = 0; i < N; i ++) {
for(int j = 0; j < N; j ++) {
sum[i][j] = F[i][j];
if(i) sum[i][j] += sum[i - 1][j];
if(j) sum[i][j] += sum[i][j - 1];
if(i && j) sum[i][j] -= sum[i - 1][j - 1];
}
}
auto Area = [&] (int x, int y, int u, int v) {
return sum[u][v] - (x ? sum[x - 1][v] : 0) - (y ? sum[u][y - 1] : 0) + (x && y ? sum[x - 1][y - 1] : 0);
};
auto Range = [&] (int x, int L, int R) {
int low = x, high = x - 1;
for(int i = 10; i >= 0; i --) {
if(low - (1 << i) >= 0 && Area(low - (1 << i), L, x, R) == 0) low -= (1 << i);
if(high + (1 << i) < N && Area(x, L, high + (1 << i), R) == 0) high += (1 << i);
# | 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... |