# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20789 | jjwdi0 | Divide and conquer (IZhO14_divide) | C++11 | 73 ms | 7272 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 INF 987654321
using namespace std;
typedef long long ll;
struct Mine {
int x, g, d;
}A[100005];
struct seg_tree {
int tree[444444], base;
void init(int x) { for(base = 1; base < x; base <<= 1); for(int i=1; i<base*2; i++) tree[i] = INF; }
void update(int x, int y) {
x += base - 1;
if(tree[x] < y) return;
tree[x] = y;
x >>= 1;
while(x) {
tree[x] = min(tree[x*2], tree[x*2+1]);
x >>= 1;
}
}
int RMQ(int s, int e) {
s += base - 1, e += base - 1;
int res = INF;
while(s < e) {
if(s & 1) res = min(res, tree[s++]);
if(!(e & 1)) res = min(res, tree[e--]);
s >>= 1, e >>= 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... |