# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
6155 | gs12117 | 한자 끝말잇기 (JOI14_kanji) | C++98 | 872 ms | 92972 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 ull unsigned long long
#define INF 4000000000000000000LL
#include<stdio.h>
static ull w[301][301];
static bool v[90010];
static int R[61], cnt[5];
static int hc[62][6];
void Anna(int N, int M, int A[], int B[], long long C[], int Q, int S[], int T[], int K, int U[]) {
int i, j, k, x, y, xx, yy;
ull g;
for (i = 0; i < K; i++){
v[U[i]] = true;
}
for (i = 0; i < Q; i++)R[i] = -1;
for (i = 0; i < N; i++){
for (j = 0; j < N; j++){
if (i != j)w[i][j] = INF;
else w[i][j] = 0;
}
}
for (i = 0; i < M; i++){
if (!v[i])w[A[i]][B[i]] = C[i];
}
for (k = 0; k < N; k++){
for (i = 0; i < N; i++){
for (j = 0; j < N; j++){
if (w[i][j]>w[i][k] + w[k][j])w[i][j] = w[i][k] + w[k][j];
}
}
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... |