Submission #1585893
Source Code Expand
n,m=map(int,input().split()) costs=[[99999 if i!=j else 0 for j in range(n)] for i in range(n)] for _ in range(m): a,b,t=map(int,input().split()) costs[a-1][b-1]=costs[b-1][a-1]=t costs=[[[min(costs[i][j],costs[i][k]+costs[k][j]) for k in range(n)] for j in range(n)] for i in range(n)] print(min(map(max,costs)))
Submission Info
Submission Time | |
---|---|
Task | D - バスと避けられない運命 |
User | nike247 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 331 Byte |
Status | RE |
Exec Time | 5264 ms |
Memory | 126068 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 | RE | 17 ms | 3064 KB |
sample_02.txt | RE | 17 ms | 3064 KB |
sample_03.txt | RE | 17 ms | 3060 KB |
test_01.txt | WA | 16 ms | 3064 KB |
test_02.txt | TLE | 5262 ms | 118772 KB |
test_03.txt | TLE | 5263 ms | 119412 KB |
test_04.txt | RE | 3578 ms | 85364 KB |
test_05.txt | RE | 2986 ms | 67316 KB |
test_06.txt | RE | 266 ms | 8820 KB |
test_07.txt | TLE | 5263 ms | 119284 KB |
test_08.txt | RE | 27 ms | 3316 KB |
test_09.txt | RE | 2033 ms | 46068 KB |
test_10.txt | RE | 222 ms | 8052 KB |
test_11.txt | RE | 257 ms | 8692 KB |
test_12.txt | TLE | 5152 ms | 126068 KB |
test_13.txt | RE | 288 ms | 8948 KB |
test_14.txt | RE | 424 ms | 12656 KB |
test_15.txt | TLE | 5264 ms | 120948 KB |
test_16.txt | RE | 516 ms | 15476 KB |
test_17.txt | RE | 2339 ms | 57460 KB |
test_18.txt | RE | 4730 ms | 102132 KB |
test_19.txt | RE | 543 ms | 16372 KB |
test_20.txt | RE | 454 ms | 13040 KB |
test_21.txt | RE | 17 ms | 3064 KB |
test_22.txt | RE | 1550 ms | 39016 KB |
test_23.txt | RE | 21 ms | 3064 KB |
test_24.txt | TLE | 5263 ms | 120564 KB |
test_25.txt | TLE | 5262 ms | 119284 KB |
test_26.txt | RE | 3020 ms | 56180 KB |
test_27.txt | RE | 3052 ms | 68340 KB |
test_28.txt | TLE | 5263 ms | 120564 KB |
test_29.txt | TLE | 5263 ms | 121588 KB |
test_30.txt | RE | 444 ms | 12652 KB |
test_31.txt | RE | 44 ms | 3700 KB |
test_32.txt | TLE | 5261 ms | 102772 KB |
test_33.txt | TLE | 5263 ms | 121204 KB |
test_34.txt | RE | 194 ms | 6132 KB |
test_35.txt | RE | 2346 ms | 41896 KB |
test_36.txt | TLE | 5262 ms | 118900 KB |