# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
721259 | groshi | Addk (eJOI21_addk) | C++17 | 156 ms | 11808 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>
#define int long long
using namespace std;
int drzewo[3][2000000];
int t[2000000];
int a[2000000];
int pot=1;
int zap(int x,int y,int co)
{
if(y<x)
return 0;
int wynik=0;
x+=pot;
y+=pot;
wynik=drzewo[co][x];
if(x!=y)
wynik+=drzewo[co][y];
while(x/2!=y/2)
{
if(x%2==0)
wynik+=drzewo[co][x+1];
if(y%2==1)
wynik+=drzewo[co][y-1];
x/=2;
y/=2;
}
return wynik;
}
void ustaw(int x,int co,int ile)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |