# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
537772 | rainboy | 한자 끝말잇기 (JOI14_kanji) | C11 | 170 ms | 19192 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 "Annalib.h"
#define N 300
#define C 5
#define INF 0x3f3f3f3f3f3f3f3fLL
static long long min(long long a, long long b) { return a < b ? a : b; }
void Anna(int n, int m, int *uu, int *vv, long long *ww, int q, int *ss, int *tt, int c, int *hh) {
long long ww_[N][N], dd_[N][N], xx_[C + 1][C + 1], dd1[C + 1], dd2[C + 1], ee[C + 1];
int hh_[C + 1][C + 1], pp[C + 1];
int g, g_, g1, g2, h, h_, i, j, k, u, v;
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
ww_[i][j] = INF;
for (h = 0; h < m; h++) {
u = uu[h], v = vv[h];
ww_[u][v] = ww[h];
}
for (g = 0; g < c; g++) {
h = hh[g], u = uu[h], v = vv[h];
ww_[u][v] = INF;
}
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
dd_[i][j] = i == j ? 0 : ww_[i][j];
for (k = 0; k < n; k++)
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
# | 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... |