# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
274890 | lookcook | 금 캐기 (IZhO14_divide) | C++17 | 189 ms | 33144 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>
#define int long long
using namespace std;
const int maxn = (1<<18);
int tree[2*maxn];
void update(int k, int v) {
for (int i = k+maxn; i >= 1; i /= 2) tree[i] = min(tree[i], v);
}
int query(int l, int r) {
l += maxn, r += maxn;
int res = 1e18;
while (l <= r) {
if (l%2==1) res = min(res, tree[l++]);
if (r%2==0) res = min(res, tree[r--]);
l /= 2, r /= 2;
}
return res;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
for (int i = 0; i < 2*maxn; i++) tree[i] = 1e18;
int n;
cin >> n;
int x[n+1], g[n+1], e[n+1];
x[0] = g[0] = e[0] = 0;
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... |