# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1066184 | sammyuri | The Kingdom of JOIOI (JOI17_joioi) | C++17 | 3764 ms | 106008 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int height[4][2005][2005];
bool taken[2005][2005];
int biggest = 0;
int h, w;
bool check(int limit, int index) {
// take all cells that are big enough
int req = biggest - limit;
int curbig = 0, cursmall = 1e9;
for (int i = 0; i < h; i ++)
for (int j = 0; j < w; j ++)
if (height[index][i][j] < req)
taken[i][j] = true;
else
taken[i][j] = false;
// turn into one component
for (int i = 0; i < h; i ++) {
bool seen = false;
for (int j = w - 1; j >= 0; j --) {
if (taken[i][j]) seen = true;
if (seen) {
taken[i][j] = true;
curbig = max(curbig, height[index][i][j]);
cursmall = min(cursmall, height[index][i][j]);
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |