# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
131822 | DodgeBallMan | Holiday (IOI14_holiday) | C++14 | 557 ms | 52940 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>
#include "holiday.h"
using namespace std;
//#define fuck
const int N = 1e5 + 10;
struct item{
long long va;
int sz, l, r;
}seg[20*N];
int ver[N], cnt = 1;
unordered_map<long long, int> mp;
long long va[N], ans = -1LL;
int n, s, d;
vector<long long> coord;
int newleaf( long long va, int sz ) {
seg[cnt].va = va, seg[cnt].sz = sz, seg[cnt].l = -1, seg[cnt].r = -1;
cnt++;
return cnt - 1;
}
int newpar( int l, int r ) {
seg[cnt].va = seg[l].va + seg[r].va, seg[cnt].sz = seg[l].sz + seg[r].sz, seg[cnt].l = l, seg[cnt].r = r;
cnt++;
return cnt - 1;
}
int build( int l = 1, int r = n ) {
if( l == r ) return newleaf( 0, 0 );
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |