# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
131799 | tjdgus4384 | 장애물 경기 (KOI16_dd) | C++14 | 73 ms | 65540 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;
vector<pair<int, pair<int, int> > > v;
int seg[20000001], up[100001], down[100001];
int seg1[20000001], ans = 1000000000, n;
vector<int> printans;
void update(int left, int right, int node, int start, int end, int key, int index){
if(left > end || start > right) return;
if(start <= left && right <= end) {
if(seg[node] > key) seg1[node] = index;
seg[node] = min(seg[node], key);
}
if(left == right) return;
int mid = (left+right)/2;
update(left, mid, node*2, start, end, key, index);
update(mid + 1, right, node*2+1, start, end, key, index);
}
int get(int left, int right, int node, int key){
if(left > key || key > right) return 1000000000;
if(left == key && key == right) return seg[node];
int mid = (left+right)/2;
return min(get(left, mid, node*2, key), get(mid+1, right, node*2+1, key));
}
int get1(int left, int right, int node, int key){
if(left > key || key > right) return 1000000000;
if(left == key && key == right) return seg1[node];
int mid = (left+right)/2;
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |