# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
883465 | NintsiChkhaidze | Simple game (IZhO17_game) | C++17 | 224 ms | 20052 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>
#define pb push_back
#define s second
#define f first
#define left (h<<1),l,(l + r)/2
#define right ((h<<1)|1),(l + r)/2 + 1,r
#define pii pair<int,int>
#define ll long long
#define int ll //?
using namespace std;
const int N = 1e5 + 5;
int a[N],t[4000005],n;
void updd(int h,int l,int r,int L,int R,int val){
if (r < L || R < l) return;
if (L <= l && r <= R){
t[h] += val;
return;
}
updd(left,L,R,val);
updd(right,L,R,val);
}
int get(int h,int l,int r,int idx){
if (l == r) return t[h];
if (idx > (l + r)/2) return t[h] + get(right,idx);
return t[h] + get(left,idx);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |