# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
297807 | anonymous | 한자 끝말잇기 (JOI14_kanji) | C++14 | 189 ms | 18076 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.
// Camping template
// Optional, but helps you to not accidently share data by using namespaces
#include "Annalib.h"
#include <iostream>
#include <vector>
#include <cassert>
#define MAXN 305
#define LL long long
#define INF ((LL) 4e18 + 5e17)
using namespace std;
namespace AnnaCode {
// Put all global variables or functions for Anna here
LL dist[MAXN][MAXN];
void Anna(int N,int M,int A[],int B[],long long C[],int Q,int S[],int T[],int K,int U[]) {
// Put your code here
for (int i=0; i<N; i++) {
for (int j=0; j < N; j++) {
dist[i][j] = i == j ? 0 : INF;
}
}
for (int i=0; i<M; i++) {
dist[A[i]][B[i]] = C[i];
}
for (int k=0; k<N; k++) {
for (int i=0; i<N; i++) {
for (int j=0; j<N; j++) {
dist[i][j] = min(dist[i][j], dist[i][k] + dist[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... |