# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392329 | MiricaMatei | Worst Reporter 4 (JOI21_worst_reporter4) | C++14 | 452 ms | 77156 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;
const int MAXN = 200005;
const int inf = 2000000000;
const long long INF = 1000000000000000000LL;
struct slope_trick {
map<int, long long> delta;
slope_trick () {
delta = map<int, long long>();
}
void mergeDelta(slope_trick other) {
for (auto it:other.delta)
delta[it.first] += it.second;
other.delta.clear();
}
void add(int x, long long val) {
delta[-inf] += val;
delta[x] -= val;
delta[x + 1] += val;
}
void level(int x) {
map<int, long long>::iterator it1, it2;
it1 = delta.lower_bound(x);
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... |