# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
26085 | yosupo | Synchronization (JOI13_synchronization) | C++14 | 513 ms | 22556 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 <cstdio>
#include <vector>
using namespace std;
template<class T> using V = vector<T>;
struct Node {
using NP = Node*;
NP l, r; int sz;
Node(int sz) : sz(sz) {
ma = -1;
if (sz == 1) return;
l = new Node(sz/2);
r = new Node(sz-sz/2);
}
int ma;
void set(int k, int x) {
if (sz == 1) {
ma = x;
return;
}
if (k < sz/2) {
l->set(k, x);
} else {
r->set(k-sz/2, x);
}
ma = max(l->ma, r->ma);
}
int sea(int b, int x) {
if (b <= 0 || ma < x) return -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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |