# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
222941 | ngot23 | Deda (COCI17_deda) | C++11 | 1078 ms | 5368 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;
const int N=200005;
int t[N*4], n, Q, ID[N*4];
void build(int l, int r, int id) {
if(l==r) {
ID[l] = id;
t[id] = 1e9 + 1;
return;
}
int mid=(r+l)>>1;
build(l, mid, id*2);
build(mid+1, r, id*2+1);
}
void update(int u, int val) {
u=ID[u];
t[u]=val;
while(u/2!=0) {
int id=u/2;
t[id]=min(t[u], t[u^1]);
u = id;
}
}
int get(int l, int r, int id, int u, int v) {
if(v<l || r<u) return int(1e9+1);
if(u<=l && r<=v) return t[id];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |