# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
197881 | gs18081 | Examination (JOI19_examination) | C++17 | 675 ms | 50732 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 pair<int,int> pi;
typedef tuple<int,int,int> ti;
const int MAXN = 101010;
struct PST{
struct Node{
int v,l,r;
}tree[MAXN * 40];
int n;
int t;
PST(){}
void resize(int size){
n = size;
t = 1;
tree[0].v = tree[0].l = tree[0].r = 0;
}
void upnode(int node){
tree[node].v = tree[tree[node].l].v + tree[tree[node].r].v;
}
int update(int prevnode,int s,int e,int pos,int diff){
if(e < pos || pos < s) return prevnode;
if(s == e){
int now = t++;
tree[now].v = tree[prevnode].v + diff;
return now;
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... |