# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
648746 | GusterGoose27 | Election (BOI18_election) | C++11 | 831 ms | 91796 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;
typedef pair<int, int> pii;
const int MAXN = 5e5;
const int inf = 1e9;
int n, q;
vector<pii> ranges[MAXN];
int pre[MAXN+1];
pii operator+(pii a, pii b) {
return pii(a.first+b.first, a.second+b.second);
}
class stree {
public:
int lz = 0, mxh = -inf;
// int sum = 0;
stree *l = nullptr;
stree *r = nullptr;
int lp, rp;
stree(int lv, int rv) {
lp = lv;
rp = rv;
if (lp == rp) {
mxh = pre[lp];
}
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... |