# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
372630 | ngpin04 | 코알라 (JOI13_koala) | C++14 | 118 ms | 7532 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;
const int N = 1e5 + 5;
const long long oo = 1e18;
struct segtree {
int n;
vector <long long> st;
segtree(int _n) {
n = _n;
st.assign(4 * n, -oo);
}
void update(int id, int l, int r, int pos, long long val) {
if (l > pos || r < pos)
return;
if (l == r) {
st[id] = max(st[id], val);
return;
}
int mid = (l + r) >> 1;
update(id << 1, l, mid, pos, val);
update(id << 1 | 1, mid + 1, r, pos, val);
st[id] = max(st[id << 1], st[id << 1 | 1]);
}
void update(int pos, long long val) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |