# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
547816 | ValiAntonie | Addk (eJOI21_addk) | C++14 | 161 ms | 8700 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;
int n,k,q,i,j,st,dr,m,lungime,indici[15];
long long v[100001],sum,suma1[100001],suma2[100001],suma3[100001],x,sum1,sum2,sum3,nr,element,j2,element2,nr2;
void update1(int x, long long y){
for(j=x;j<=n;j+=(j&-j)){
suma1[j] += y;
}
}
long long sumaa1(int x){
sum1 = 0;
for(j=x;j>=1;j-=(j&-j)){
sum1 += suma1[j];
}
return sum1;
}
void update2(int x, long long y){
for(j=x;j<=n;j+=(j&-j)){
suma2[j] += y;
}
}
long long sumaa2(int x){
sum2 = 0;
for(j=x;j>=1;j-=(j&-j)){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |