# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
307206 | katearima | Exercise Deadlines (CCO20_day1problem2) | C++11 | 217 ms | 14172 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 <queue>
using namespace std;
int s[300000],a[300000];
vector <int> v[200005];
priority_queue <int> mx;
int n,i;
long long Ans;
int prev(int u){
return u&(u-1);
}
int next(int u){
return 2*u-(u&(u-1));
}
int sum(int x, int y){
int ans=0;
while(y>0){
ans+=s[y];
y=prev(y);
}
while(x>0){
ans-=s[x];
x=prev(x);
}
return ans;
}
void update(int u, long long d){
while (u<=n){
s[u]+=d;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |