# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
834698 | rainboy | Progression (NOI20_progression) | C11 | 751 ms | 43464 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 <stdio.h>
#define N 300000
#define N_ (1 << 19) /* N_ = pow2(ceil(log2(N))) */
int max(int a, int b) { return a > b ? a : b; }
int h_, n_;
char tt[N_ * 2]; long long aa[N_ * 2], bb[N_ * 2];
void put(int i, int t, long long a, long long b) {
if (t == 1) {
if (tt[i] == 0)
tt[i] = 1;
aa[i] += a, bb[i] += b;
} else
tt[i] = 2, aa[i] = a, bb[i] = b;
}
void pus(int i) {
if (tt[i]) {
put(i << 1 | 0, tt[i], aa[i], bb[i]), put(i << 1 | 1, tt[i], aa[i], bb[i]), tt[i] = aa[i] = bb[i] = 0;
}
}
void push(int i) {
int h;
for (h = h_; h > 0; h--)
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... |