# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
440251 | BaraaArmoush | Distributing Candies (IOI21_candies) | C++17 | 936 ms | 21736 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>
#define mid ((l + r) >> 1)
#define left (node << 1)
#define right (node << 1 | 1)
using namespace std;
typedef long long ll;
const int N = 200200;
const int M = 4 * N;
int n;
int A[N];
int C[N];
ll P[N];
ll tree[M];
int lazy1[M];
ll lazy2[M];
void Merge(int node) {
tree[node] = tree[left] + tree[right];
}
void push_lazy(int node, int l, int r) {
if (lazy1[node]) {
tree[node] = (lazy1[node] == 1 ? P[r + 1] - P[l] : 0);
if (l < r) {
lazy1[left] = lazy1[right] = lazy1[node];
lazy2[left] = lazy2[right] = 0;
# | 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... |