結果
問題 | No.1382 Travel in Mitaru city |
ユーザー |
![]() |
提出日時 | 2021-02-08 16:26:17 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 2,743 ms |
コンパイル使用メモリ | 175,780 KB |
実行使用メモリ | 9,600 KB |
最終ジャッジ日時 | 2024-07-05 15:03:01 |
合計ジャッジ時間 | 7,527 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 68 |
ソースコード
int p[1d5],a[1d5],b[1d5]; { int @n,@m,@s,@t; --s; rd(p(n),(a--,b--)(m)); graph g; g.setEdge(n,m,a,b); int x=p[s],y=0; DijkstraHeap<int> h; h.walloc(n); h.init(n); h.change(s,-p[s]); while(h.size){ int i=h.pop(); if(x>p[i]){ x=p[i]; y+=1; } rep[g.edge[i]](j,g.es[i]){ h.change(j,-p[j]); } } wt(y); }