# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
721259 | groshi | Addk (eJOI21_addk) | C++17 | 156 ms | 11808 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |