# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
747569 | Andrei_ierdnA | The Kingdom of JOIOI (JOI17_joioi) | C++17 | 1077 ms | 102080 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <iomanip>
using namespace std;
#define INF 1000000001
int n, m, i, j, a[2010][2010], ao[2010][2010], av[2010][2010], ac[2010][2010];
int mini = INF, maxi = 0, st, dr, mij, sol;
bool testDiff (int x, int (&a)[2010][2010])
{
int prevh = n;
for (j = 1; j <= m; j++) {
for (i = 1; i <= prevh; i++) {
if (a[i][j] > mini+x)
break;
}
prevh = i-1;
for (; i <= n; i++) {
if (a[i][j] < maxi-x)
return false;
}
}
return true;
}
bool testAllDiff (int x)
{
return (testDiff(x, a) || testDiff(x, ao) || testDiff(x, av) || testDiff(x, ac));
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |