Submission #286049

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2860492020-08-30 02:34:41emanIaicepsaHoliday (IOI14_holiday)C++14
23 / 100
1469 ms36916 KiB
#include"holiday.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define fi first
#define se second
#define pii pair<ll,ll>
#define all(n) (n).begin(),(n).end()
#define pb push_back
#define dbg(x) cerr<<#x<<" = "<<x<<'\n';
struct Persistent_tree{
ll l, r;
ll tot, cnt;
}tr[8000005];
ll idx = 0, rt[100005];
void insert(ll copy, ll &now, ll val, ll L, ll R){
now = ++idx;
if(copy) tr[now] = tr[copy];
tr[now].cnt++;
tr[now].tot += val;
if(L == R){
/* cout<<now<<'\n'; */
return;
}
ll M = (L+R)/2;
if(val <= M) insert(tr[copy].l, tr[now].l, val, L, M);
else insert(tr[copy].r, tr[now].r, val, M+1, R);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...