# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
545609 | chonka | Cake 3 (JOI19_cake3) | C++98 | 1133 ms | 202348 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>
using namespace std ;
typedef long long ll ;
// mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
#define MAXN 200007
const ll inf = 1e17 ;
int n , k ;
pair < int , int > a[ MAXN ] ;
pair < int , int > srt[ MAXN ] ;
int ord[ MAXN ] ;
struct node {
ll sm ;
int cnt ;
node *pl , *pr ;
node ( ) { sm = cnt = 0 ; pl = pr = NULL ; }
node ( node *_pl , node *_pr ) {
pl = _pl ; pr = _pr ;
sm = 0 ; cnt = 0 ;
if ( pl != NULL ) {
sm += pl->sm ;
cnt += pl->cnt ;
}
if ( pr != NULL ) {
sm += pr->sm ;
cnt += pr->cnt ;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |