# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
240894 | zoomswk | Rectangles (IOI19_rect) | C++17 | 35 ms | 6648 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rect.h"
using namespace std;
int max_in_row[205][205][205]; // max_in_row[i][j][k] = max{a[i][j..k]}
int col_prev_larger[205][205]; // stores prev row
int min_col_prev_larger[205][205][205]; // stores prev row
int col_next_larger[205][205]; // stores next row
int max_col_next_larger[205][205][205]; // stores next row
long long count_rectangles(std::vector<std::vector<int> > a) {
int n = (int)a.size();
int m = (int)a[0].size();
if(n < 3 || m < 3) return 0;
for(int i=1; i<n-1; i++){
for(int j=1; j<m-1; j++){
max_in_row[i][j][j] = a[i][j];
for(int k=j+1; k<m-1; k++){
max_in_row[i][j][k] = max(max_in_row[i][j][k-1], a[i][k]);
}
col_prev_larger[i][j] = 1e9;
for(int k=i-1; k>=0; k--){
if(a[k][j] > a[i][j]){
col_prev_larger[i][j] = k;
break;
}
}
col_next_larger[i][j] = -1;
# | 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... |