# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
752882 | bgnbvnbv | The Kingdom of JOIOI (JOI17_joioi) | C++14 | 1 ms | 340 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define TASKNAME "codeforce"
#define pb push_back
#define pli pair<int,int>
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;
using ll=long long;
const ll maxN=4e6+10;
const ll inf=1e18;
const ll mod=1e9+7;
ll n,m;
ll ans=inf;
ll a[2006][2006],b[2006][2006],mx=-inf,mn=inf;
bool check(ll mid)
{
ll mxr=0;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
if(b[i][j]<mx-mid) mxr=j;
}
for(int j=1;j<=mxr;j++)
{
if(b[i][j]-mn>mid) return false;
}
}
Compilation message (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... |