# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
422890 | oleh1421 | Rectangles (IOI19_rect) | C++17 | 4 ms | 460 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 "grader.cpp"
#include "rect.h"
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int n,m;
const int N=2500;
int a[N][N],l[N][N],r[N][N];
int mx[N];
int L[N],R[N];
int x[N],y[N];
ll count_rectangles(vector<vector<int> > vv) {
n=vv.size(),m=vv[0].size();
for (int i=1;i<=n;i++){
for (int j=1;j<=m;j++){
a[i][j]=vv[i-1][j-1];
}
}
for (int i=1;i<=n;i++){
for (int j=1;j<=m;j++){
l[i][j]=0;
for (int t=j-1;t>=1;t=l[i][t]){
if (a[i][t]>=a[i][j]){
l[i][j]=t;
break;
}
}
}
for (int j=m;j>=1;j--){
r[i][j]=m+1;
Compilation message (stderr)
# | 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... |