# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
683348 | TimDee | 송신탑 (IOI22_towers) | C++17 | 1536 ms | 5816 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 "towers.h"
#include <bits/stdc++.h>
using namespace std;
#define forn(i,n) for(int i=0;i<n;++i)
struct minsgt {
vector<int> t;
int n, sz;
int merge(int x, int y) {
return min(x,y);
}
void build(int v, int l, int r) {
if (r-l==1) return;
int m=(l+r)>>1;
build(2*v+1,l,m);
build(2*v+2,m,r);
t[v]=merge(t[2*v+1],t[2*v+2]);
}
minsgt(vector<int>&a) {
n=a.size();
sz=1;
while (sz<n) sz<<=1;
t.assign(2*sz-1,1e9+7);
forn(i,n) t[sz-1+i]=a[i];
build(0,0,sz);
}
int query(int v, int l, int r, int lx, int rx) {
if (r<=lx || l>=rx) return 1e9+7;
if (lx<=l && r<=rx) return t[v];
int m=(l+r)>>1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |