# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
467906 | trumchepcode | Deda (COCI17_deda) | C++14 | 117 ms | 6340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N=1e5+1;
const long long inf=1e9+7;
int n,q;
long long st[4*N];
void build(int id,int l,int r)
{
if(l>r) return ;
if(l==r)
{
st[id]=inf;
return ;
}
int mid=(l+r)/2;
build(id*2,l,mid);
build(id*2+1,mid+1,r);
st[id]=min(st[id*2],st[id*2+1]);
}
void update(int id,int l,int r,int a,int x)
{
if(l>a||a>r) return ;
if(l==r)
{
st[id]=x;
return ;
}
int mid=(l+r)/2;
update(id*2,l,mid,a,x);
update(id*2+1,mid+1,r,a,x);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |