Submission #1678795
Source Code Expand
import numpy as np N, M = map(int, input().split(' ')) G = np.zeros([N, N], np.int8) for i in range(M): a, b, t = map(int, input().split(' ')) G[a - 1, b - 1] = t G[b - 1, a - 1] = t for p in range(N): for i in np.nonzero(G[:-1, p])[0]: for j in np.nonzero(G[i + 1:, p])[0]: if G[i, i + 1 + j] == 0 or G[i, p] + G[p, i + 1 + j] <= G[i, i + 1 + j]: G[i, i + 1 + j] = G[i + 1 + j, i] = G[i, p] + G[p, i + 1 + j] print(np.min(np.max(G, axis=0)))
Submission Info
Submission Time | |
---|---|
Task | D - バスと避けられない運命 |
User | macho_uno |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 510 Byte |
Status | WA |
Exec Time | 5260 ms |
Memory | 14552 KB |
Judge Result
Set Name | All | ||||||
---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||||
Status |
|
Set Name | Test Cases |
---|---|
All | sample_01.txt, sample_02.txt, sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 146 ms | 12392 KB |
sample_02.txt | AC | 146 ms | 12392 KB |
sample_03.txt | AC | 146 ms | 12392 KB |
test_01.txt | WA | 146 ms | 12392 KB |
test_02.txt | TLE | 5260 ms | 14552 KB |
test_03.txt | TLE | 5260 ms | 12532 KB |
test_04.txt | TLE | 5260 ms | 12392 KB |
test_05.txt | TLE | 5260 ms | 14424 KB |
test_06.txt | WA | 4559 ms | 12392 KB |
test_07.txt | TLE | 5260 ms | 14552 KB |
test_08.txt | WA | 312 ms | 12392 KB |
test_09.txt | TLE | 5260 ms | 14424 KB |
test_10.txt | WA | 3684 ms | 12392 KB |
test_11.txt | WA | 4317 ms | 14424 KB |
test_12.txt | TLE | 5260 ms | 12504 KB |
test_13.txt | WA | 4954 ms | 14424 KB |
test_14.txt | TLE | 5260 ms | 12392 KB |
test_15.txt | TLE | 5260 ms | 12504 KB |
test_16.txt | TLE | 5260 ms | 12392 KB |
test_17.txt | TLE | 5260 ms | 14424 KB |
test_18.txt | TLE | 5260 ms | 12504 KB |
test_19.txt | TLE | 5260 ms | 12392 KB |
test_20.txt | TLE | 5260 ms | 14424 KB |
test_21.txt | WA | 149 ms | 12392 KB |
test_22.txt | TLE | 5260 ms | 14424 KB |
test_23.txt | WA | 209 ms | 12392 KB |
test_24.txt | WA | 933 ms | 12504 KB |
test_25.txt | WA | 831 ms | 12504 KB |
test_26.txt | WA | 616 ms | 12392 KB |
test_27.txt | WA | 1116 ms | 12392 KB |
test_28.txt | WA | 938 ms | 12504 KB |
test_29.txt | WA | 862 ms | 12504 KB |
test_30.txt | WA | 359 ms | 12392 KB |
test_31.txt | WA | 188 ms | 12392 KB |
test_32.txt | WA | 1170 ms | 12504 KB |
test_33.txt | WA | 2332 ms | 12504 KB |
test_34.txt | WA | 248 ms | 12392 KB |
test_35.txt | WA | 415 ms | 12392 KB |
test_36.txt | WA | 1694 ms | 14548 KB |