# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
52572 | tlwpdus | Pinball (JOI14_pinball) | C++11 | 265 ms | 15932 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;
typedef long long ll;
typedef pair<int,int> pii;
const ll INF = 1LL<<55;
struct segtree {
int key = 524288;
ll tree[1050000];
void init() {
int i;
for (i=0;i<2*key;i++) tree[i] = INF;
}
void upd(int idx, ll v) {
idx += key;
while(idx) {
tree[idx] = min(tree[idx],v);
idx/=2;
}
}
ll getv(int s, int e) {
s += key; e += key;
ll val = INF;
while(s<=e) {
if (s&1) val = min(val,tree[s++]);
if (~e&1) val = min(val,tree[e--]);
s/=2; e/=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... |