# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
39646 | funcsr | Wall (IOI14_wall) | C++14 | 846 ms | 143092 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 "wall.h"
#include <vector>
#include <iostream>
#include <set>
#include <queue>
#include <algorithm>
#include <cassert>
using namespace std;
typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define MAX_N (1<<19)
#define INF 1145141919
#define pb push_back
struct Node {
int a, b;
Node(int a, int b) : a(a), b(b) {}
Node() : a(INF), b(0) {}
int f(int x) { return min(a, max(b, x)); }
};
inline Node op(const Node &l, const Node &r) {
return Node(min(r.a, max(l.a, r.b)), max(l.b, r.b));
}
Node seg[MAX_N*2-1];
void update(int k, const Node &v) {
k += MAX_N-1;
seg[k] = v;
while (k > 0) {
k = (k-1)/2;
# | 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... |