# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
832325 | rainboy | Dabbeh (INOI20_dabbeh) | C11 | 300 ms | 112584 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 <string.h>
#define N 300000
#define M 10000
#define L 500000
#define N_ (L + 2)
#define A 26
int tt[N_][A], ff_[N_][A], ff[N_], dd[N_], n_;
void build(char **ccc, int m) {
static int qu[N_];
int cnt, l, g, h, a, s, t, e, f;
n_ = 2;
dd[0] = -1, dd[1] = 0;
for (h = 0; h < m; h++) {
l = strlen(ccc[h]);
for (g = 0, s = 1; g < l; g++) {
a = ccc[h][g] - 'a';
if (!tt[s][a])
dd[tt[s][a] = n_++] = g + 1;
s = tt[s][a];
}
}
cnt = 0;
for (a = 0; a < A; a++)
tt[0][a] = 1, ff_[0][a] = 0;
ff[1] = 0, qu[cnt++] = 1;
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... |