# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
102847 | wxh010910 | Seats (IOI18_seats) | C++17 | 1880 ms | 126008 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>
#include "seats.h"
using namespace std;
class segtree_t {
private:
struct node_t {
int tag, value, answer;
};
vector<node_t> tree;
int n;
void apply(int x, int value) {
tree[x].tag += value;
tree[x].value += value;
}
void push_up(int x, int z) {
tree[x].value = min(tree[x + 1].value, tree[z].value);
tree[x].answer = 0;
if (tree[x].value == tree[x + 1].value) {
tree[x].answer += tree[x + 1].answer;
}
if (tree[x].value == tree[z].value) {
tree[x].answer += tree[z].answer;
}
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |