# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
83594 | ToadDaveski | Simple game (IZhO17_game) | C++14 | 472 ms | 35560 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define INF 1000000
using namespace std;
ll t[8000001];
ll a[100001];
void update(ll x,ll l,ll r,ll tl,ll tr,ll value)
{
//cout<<l<<" "<<r<<" "<<tl<<" "<<tr<<endl;
if (tl>tr)
return;
if (tl==l && tr==r)
{
t[x]+=value;
//cout<<l<<" "<<r<<" "<<t[x]<<endl;
return ;
}
else
{
ll bm=(l+r)/2;
update(x*2,l,bm,tl,min(tr,bm),value);
update(x*2+1,bm+1,r,max(bm+1,tl),tr,value);
}
}
ll findans(ll x,ll l,ll r,ll poz)
{
//cout<<x<<" "<<l<<" "<<r<<" "<<t[x]<<endl;
if (l==r)
return t[x];
else
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |