Submission #1585923
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 for k in range(n): costs=[[min(costs[i][j],costs[i][k]+costs[k][j]) for j in range(n)] for i in range(n)] print(min(map(max,costs)))
Submission Info
Submission Time | |
---|---|
Task | A - スワップ |
User | nike247 |
Language | PyPy3 (2.4.0) |
Score | 0 |
Code Size | 331 Byte |
Status | RE |
Exec Time | 163 ms |
Memory | 38640 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | sample_01.txt, sample_02.txt, test_13_69.txt, test_16_44.txt, test_40_40.txt, test_49_31.txt, test_51_74.txt, test_83_60.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | RE | 163 ms | 38384 KB |
sample_02.txt | RE | 160 ms | 38256 KB |
test_13_69.txt | RE | 160 ms | 38256 KB |
test_16_44.txt | RE | 160 ms | 38256 KB |
test_40_40.txt | RE | 162 ms | 38512 KB |
test_49_31.txt | RE | 162 ms | 38384 KB |
test_51_74.txt | RE | 163 ms | 38640 KB |
test_83_60.txt | RE | 162 ms | 38384 KB |