| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 398032 | snasibov05 | Rectangles (IOI19_rect) | C++14 | 88 ms | 91604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rect.h"
using namespace std;
long long count_rectangles(std::vector<std::vector<int> > a) {
int n = a.size();
int m = a[0].size();
long long ans = 0;
for (int r1 = 1; r1 < n-1; ++r1) {
for (int c1 = 1; c1 < m-1; ++c1) {
vector<vector<int>> rmx(n, vector<int>(m)), cmx(m, vector<int>(n));
for (int r2 = r1; r2 < n-1; ++r2) {
for (int c2 = c1; c2 < m-1; ++c2) {
rmx[r2][c2] = max(rmx[r2][c2-1], a[r2][c2]);
cmx[c2][r2] = max(rmx[c2][r2-1], a[r2][c2]);
bool flag = true;
for (int i = r1; i <= r2 && flag; ++i) {
if (rmx[i][c2] >= a[i][c1-1]) flag = false;
if (rmx[i][c2] >= a[i][c2+1]) flag = false;
}
for (int i = c1; i <= c2 && flag; ++i) {
if (cmx[i][r2] >= a[r1-1][i]) flag = false;
if (cmx[i][r2] >= a[r2+1][i]) flag = false;
}
if (flag) ans++;
}
}
int x = 1;
}
}
return ans;
}
컴파일 시 표준 에러 (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... | ||||
