# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
306251 | colazcy | Deda (COCI17_deda) | C++17 | 157 ms | 6904 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 <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 2e5 + 100;
int n,q;
char com[4];
namespace st{
#define ls (rt << 1)
#define rs (rt << 1 | 1)
int mi[maxn << 2];
inline void pushup(int rt){
mi[rt] = min(mi[ls],mi[rs]);
}
inline void build(int a = 1,int b = n,int rt = 1){
if(a == b){
mi[rt] = 0x7fffffff;
return;
}
int mid = (a + b) >> 1;
build(a,mid,ls);
build(mid + 1,b,rs);
pushup(rt);
}
inline void modify(int pos,int v,int l = 1,int r = n,int rt = 1){
if(l == r){
mi[rt] = v;
return;
}
int mid = (l + r) >> 1;
if(pos <= mid)modify(pos,v,l,mid,ls);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |