# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
378251 | peijar | The Kingdom of JOIOI (JOI17_joioi) | C++17 | 594 ms | 101884 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000;
const int MAXROT = 4;
int altitude[MAXROT][MAXN][MAXN];
int nbLig, nbCol;
int petit(1e9), grand(0);
bool isOk(int iRot, int deltaMax)
{
int prv(nbCol-1);
for (int iLig(0); iLig < nbLig; ++iLig)
{
int curCol(-1);
while (curCol + 1 <= prv and altitude[iRot][iLig][curCol+1] <= petit + deltaMax)
++curCol;
prv = curCol;
if (prv == -1 and !iLig)
return false;
for (int iCol=curCol+1; iCol < nbCol; ++iCol)
if (altitude[iRot][iLig][iCol] < grand - deltaMax)
return false;
}
return true;
}
bool can(int delta)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |