# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
581633 | georgievskiy | Distributing Candies (IOI21_candies) | C++17 | 975 ms | 46540 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 "candies.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2e5;
//const int N = 10;
const ll inf = 2e18;
struct ST {
ll t[4 * N], mn[4 * N], mx[4 * N];
ST(){
fill(t, t + 4 * N, 0);
fill(mn, mn + 4 * N, 0);
fill(mx, mx + 4 * N, 0);
}
inline void push(int v) {
t[2 * v + 1] += t[v], mn[2 * v + 1] += t[v], mx[2 * v + 1] += t[v];
t[2 * v + 2] += t[v], mn[2 * v + 2] += t[v], mx[2 * v + 2] += t[v];
t[v] = 0;
}
inline void upd(int v) {
mn[v] = min(mn[2 * v + 1], mn[2 * v + 2]), mx[v] = max(mx[2 * v + 1], mx[2 * v + 2]);
}
void add(int v, int tl, int tr, int l, int r, ll d) {
if (tl >= r || tr <= l)
return;
if (tl >= l && tr <= r) {
# | 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... |