# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
956818 | tosivanmak | Teams (IOI15_teams) | C++17 | 3609 ms | 462556 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;
#define ll int
#define pb push_back
ll n;
ll refseg=1,curver;
ll members[500005];
struct SEG{
vector<vector<ll> >seg,lc,rc;
vector<ll>temp,templ,tempr;
inline void init(ll n){
seg.resize(4*n+5),lc.resize(4*n+5),rc.resize(4*n+5),temp.resize(4*n+5);
templ.resize(4*n+5),tempr.resize(4*n+5);
}
inline void build(ll l, ll r, ll id){
if(l==r){
seg[id].pb(0);
return;
}
else{
ll mid=(l+r)>>1;
build(l,mid,id*2),build(mid+1,r,id*2+1);
seg[id].pb(0),lc[id].pb(0),rc[id].pb(0);
}
}
inline void upd(ll ver, ll ul, ll l, ll r, ll val, ll id){
// cout<<ver<<' '<<ul<<' '<<l<<" "<<r<<" "<<val<<" "<<id<<'\n';
if(l==r){
seg[id].pb(seg[id][ver]+val);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |