# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
810638 | rainboy | Sličnost (COI23_slicnost) | C11 | 1597 ms | 422484 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 100000
#define LN 17 /* LN = ceil(log2(N)) */
#define N_ (1 << LN)
#define N1 (N * 2 + (N * 4 + Q * 8) * (LN + 1) + 1)
#define Q 100000
int max(int a, int b) { return a > b ? a : b; }
int ll[N1], rr[N1], ss[N1], pr[N1], kk[N1], _ = 1;
int build(int l, int r) {
int t_ = _++;
ss[t_] = 0, pr[t_] = 0, kk[t_] = r - l;
if (r - l > 1) {
int m = (l + r) / 2;
ll[t_] = build(l, m), rr[t_] = build(m, r);
}
return t_;
}
void pul(int t) {
int l = ll[t], r = rr[t];
ss[t] = ss[l] + ss[r];
if (pr[l] > ss[l] + pr[r])
pr[t] = pr[l], kk[t] = kk[l];
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... |