# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
430517 | kimbj0709 | 역사적 조사 (JOI14_historical) | C++14 | 4009 ms | 13752 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 int long long
#define maxn 100050
#define sqrtn 320
#define f first
#define s second
vector<int> seg(maxn*4,0);
vector<int> num(maxn,0);
vector<int> compress;
vector<int> vect1;
vector<int> ans(maxn,0);
vector<vector<pair<int,pair<int,int> > > > queries(sqrtn);
void build(int node,int start,int end){
if(start==end){
seg[node] = start;
return;
}
int mid = (start+end)/2;
build(node*2+1,start,mid);build(node*2+2,mid+1,end);
seg[node] = seg[node*2+1];
}
void update(int node,int start,int end,int pos,int val){
if(start==end){
num[start] += val;
return;
}
int mid = (start+end)/2;
if(pos<=mid){
update(node*2+1,start,mid,pos,val);
# | 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... |