結果
問題 |
No.807 umg tours
|
ユーザー |
![]() |
提出日時 | 2020-09-06 10:43:25 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 425 bytes |
コンパイル時間 | 250 ms |
コンパイル使用メモリ | 82,428 KB |
実行使用メモリ | 66,964 KB |
最終ジャッジ日時 | 2024-11-29 06:47:32 |
合計ジャッジ時間 | 3,396 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 26 |
ソースコード
from numpy import* from scipy.sparse import* n,m=map(int,input().split()) e=[] for i in range(m): a,b,c=map(int,input().split()) for _ in [0,0]: e.append([a,b,c]) e.append([a,b+n,0]) e.append([a+n,b+n,c]) a,b=b,a edge=array(e,int64).T graph=csr_matrix((edge[2],edge[:2]-1),(n+n,n+n)) dist=csgraph.dijkstra(graph,True,0) for i in range(n): print(int(dist[i]+min(dist[i],dist[i+n])))