# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
208143 | achibasadzishvili | Cake 3 (JOI19_cake3) | C++17 | 988 ms | 111336 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 ll long long
#define f first
#define s second
#define pb push_back
#define N 200005
using namespace std;
pair<ll,ll>a[N];
long long co,cur,z,kk,sum1,sum2,of;
int t,raod,pp,mid,ind;
ll n,m,ans=-9999999999999999;
bool lst[3 * N + 60000];
vector<long long>v[3*N + 60000];
vector<int>b[3*N + 60000],g;
void build(int x){
if((int)v[x].size() <= 1){
lst[x] = 1;
return;
}
g.clear();
for(int i=1; i<v[x].size(); i++)
g.pb(v[x][i]);
sort(g.begin() , g.end());
if(g[0] == g[g.size() - 1]){
lst[x] = 1;
return;
}
of=0;
mid = g[((int)g.size() - 1) / 2];
for(int i=((int)g.size() - 1) / 2; i>=0; i--){
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... |