# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
988872 | Ariadna | Last supper (IOI12_supper) | C++14 | 65 ms | 9800 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 "advisor.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
struct Segtree {
int n;
vector<pair<int, int>> st;
Segtree(const vector<int>& a) {
n = a.size();
st = vector<pair<int, int>>(4*n);
build(1, 0, n-1, a);
}
void build(int p, int l, int r, const vector<int>& a) {
if (l == r) st[p] = {a[l], l};
else {
int m = (l+r)/2;
build(2*p, l, m, a);
build(2*p+1, m+1, r, a);
if (st[2*p] > st[2*p+1]) st[p] = st[2*p];
else st[p] = st[2*p+1];
}
}
void change(int p, int l, int r, int i, int v) {
if (l == r) st[p] = {v, i};
else {
# | 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... |