# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
729861 | kthng | 수족관 1 (KOI13_aqua1) | C++17 | 2 ms | 544 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<iostream>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
static const int inf = 1e8;
int n, k;
pii a[300000];
int b[300000];
map<pii, int> mp;
pii tree[600004];
void update(int idx, int s, int e, int x, int val) {
if (x < s || x > e) return;
if (s == e) {
tree[idx] = pii(val, x);
return;
}
int m = s + e >> 1;
update(idx << 1, s, m, x, val);
update(idx << 1 | 1, m + 1, e, x, val);
tree[idx] = min(tree[idx << 1], tree[idx << 1 | 1]);
}
pii get(int idx, int s, int e, int l, int r) {
if (r < s || e < l) return pii(inf, -1);
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... |