# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
405685 | Tc14 | Rectangles (IOI19_rect) | C++17 | 2622 ms | 1048580 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.
//#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include "rect.h"
using namespace std;
#define ve vector
typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1e9 + 10;
ll count_rectangles(ve<ve<int>> A) {
int n, m;
ve<ve<ve<int>>> R, C;
n = (int)A.size();
m = (int)A[0].size();
R = ve<ve<ve<int>>>(m, ve<ve<int>>(m, ve<int>(n, -1)));
C = ve<ve<ve<int>>>(n, ve<ve<int>>(n, ve<int>(m, -1)));
for (int i = 1; i < m - 1; i++) {
ve<int> Max(n, 0);
for (int j = i; j >= 1; j--) {
int cnt = 0;
for (int k = 1; k < n - 1; k++) {
Max[k] = max(Max[k], A[k][j]);
if (Max[k] < A[k][i + 1] && Max[k] < A[k][j - 1]) {
R[i][j][k] = cnt;
# | 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... |