# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1098863 | _callmelucian | Food Court (JOI21_foodcourt) | C++14 | 364 ms | 72528 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 long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tt;
#define all(a) a.begin(), a.end()
#define filter(a) e.erase(unique(all(a)), a.end())
const int mn = 2e5 + 5e4 + 4;
struct node {
ll neg, val;
node() : neg(0), val(0) {}
node (ll neg, ll val) : neg(neg), val(val) {}
node operator + (const node &o) const {
ll delta = val - o.neg;
return node(neg - min(0LL, delta), o.val + max(0LL, delta));
}
};
struct IT {
vector<node> tr;
IT (int sz) : tr(4 * sz) {}
void update (int pos, ll val, int k, int l, int r) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |