# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
467193 | jli12345 | Happiness (Balkan15_HAPPINESS) | C++14 | 1891 ms | 507924 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 "happiness.h"
using namespace std;
typedef long long ll;
struct Node{
ll sum;
int lson, rson;
Node(){
sum = 0;
lson = rson = -1;
}
} st[500100*64];
int nodecnt = 1;
void newnode(int node){
if (st[node].lson == -1)
st[node].lson = ++nodecnt;
if (st[node].rson == -1)
st[node].rson = ++nodecnt;
}
void U(int node, ll l, ll r, ll ind, ll val){
if (l > ind || r < ind)
return;
if (l == r){
st[node].sum += 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... |