# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1127975 | bunhadasou | Synchronization (JOI13_synchronization) | C++20 | 219 ms | 21932 KiB |
#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define PB push_back
#define EB emplace_back
#define ll long long
#define bit(n,i) ((n>>i)&1)
#define sz(x) (int)x.size()
#define all(x) x.begin(),x.end()
#define TASK "cf"
using namespace std;
struct fenwick{
vector<int>ft;
int lim;
void reset(int _n){
lim=_n+5;
ft.assign(_n+10,0);
}
void upd(int pos,int val){
for(;pos<=lim;pos+=pos&-pos) ft[pos]+=val;
}
int get(int pos){
int res=0;
for (;pos>0;pos-=pos&-pos) res+=ft[pos];
return res;
}
void updating(int l,int r,int val){
upd(l,val);upd(r+1,-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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |