結果
問題 | No.2805 Go to School |
ユーザー |
![]() |
提出日時 | 2024-07-17 10:59:49 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 85 ms / 2,000 ms |
コード長 | 393 bytes |
コンパイル時間 | 3,289 ms |
コンパイル使用メモリ | 189,300 KB |
実行使用メモリ | 24,056 KB |
最終ジャッジ日時 | 2025-04-09 15:42:27 |
合計ジャッジ時間 | 6,188 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
int@(n,m,l,s,e),@(a--,b--,t)[m],u[2d5]; rep(l){ int@x--; u[x]=1; } wgraph<int>g; g.setEdge(n,m,a,b,t); DijkstraHeap<ll>h; h.malloc(2n,1); h.change(0,0); while(h.size){ int i=h.pop(); ll v=h.val[i]; if(i==2n-1){ wt(v); exit(0); } int i0=i<n?i:i-n; rep(j,g.es[i0]){ h.change(g.edge[i0][j]+(i-i0),v+g.cost[i0][j]); } if(i<n&&v<s+e&&u[i]){ h.change(i+n,max(s,v)+1); } } wt(-1);