# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
545869 | rainboy | Space Pirate (JOI14_space_pirate) | C11 | 1469 ms | 140040 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>
#include <stdlib.h>
#include <string.h>
#define N 100000
#define L 60 /* L = ceil(log2(10^18)) */
int *ej[N], eo[N], *ed[N * 6 + 1], eo_[N * 6 + 1], pp[N], pp_[L + 1][N], ii[N + 1], tt[N], tt_[N], n;
long long cc[N], bb[N], cc_[L + 1][N], k, time;
void init(int n, long long l, long long r) {
int d;
long long a;
for (d = 1; d <= n; d++) {
a = l / d * d;
while (a < l)
a += d;
while (a >= l + d)
a -= d;
while (a <= r)
eo_[a - l]++, a += d;
}
for (a = l; a <= r; a++)
ed[a - l] = (int *) malloc(eo_[a - l] * sizeof *ed[a - l]), eo_[a - l] = 0;
for (d = 1; d <= n; d++) {
a = l / d * d;
while (a < l)
a += d;
while (a >= l + d)
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... |