# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
57864 | gabrielsimoes | Cake (CEOI14_cake) | C++17 | 495 ms | 72740 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 MAXN = 250010, MAXQ = 500010;
typedef pair<int, int> pii;
struct Bit {
int sz;
vector<int> v;
Bit() : sz(0), v(MAXN) {};
void resize(int x) {
sz = x;
}
int get(int pos) {
int ret = 0;
while (pos > 0) {
ret = max(ret, v[pos]);
pos -= pos&-pos;
}
return ret;
}
void update(int pos, int val) {
while (pos <= sz) {
v[pos] = max(v[pos], val);
pos += pos&-pos;
}
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... |