結果
| 問題 |
No.2354 Poor Sight in Winter
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2023-06-16 22:06:55 |
| 言語 | cLay (20241019-1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 423 bytes |
| コンパイル時間 | 3,398 ms |
| コンパイル使用メモリ | 182,832 KB |
| 実行使用メモリ | 8,132 KB |
| 最終ジャッジ日時 | 2024-06-24 14:24:24 |
| 合計ジャッジ時間 | 4,329 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 16 |
ソースコード
ll@n,@k,x[n+2],y[];
rd((x,y)(n+2));
DijkstraHeap<ll>h;
h.malloc((n+2)*(n+2),1);
priority_queue<pair<ll,pair<ll,ll>>>q;
h.change(0,0);
while(true){
ll i=h.pop();
ll v=h.val[i];
q.push({v,{v,1}});
if(i==1){
break;
}
rep(j,n+2){
h.change(j,abs(x[j]-x[i])+abs(y[j]-y[i]));
}
}
rep(k){
auto a=q.top();
q.pop();
q.push({a.second.first/+(a.second.second+1),{a.second.first,a.second.second+1}});
}
wt(q.top().first);
tails