# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
946969 | Pacybwoah | Constellation 3 (JOI20_constellation3) | C++17 | 342 ms | 30364 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<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<set>
using namespace std;
typedef long long ll;
struct rng{
ll val;
int l,r,x,y;
rng(ll _val,int _l,int _r,int _x,int _y){
val=_val,l=_l,r=_r,x=_x,y=_y;
}
};
bool operator< (const rng &a,const rng &b){
return a.y<b.y;
}
vector<ll> bit;
void modify(int pos,ll num,int n){
while(pos<=n){
bit[pos]+=num;
pos+=pos&-pos;
}
}
ll quer(int pos){
ll ans=0;
while(pos>0){
ans+=bit[pos];
pos-=(pos&-pos);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |