結果
問題 |
No.3116 More and more teleporter
|
ユーザー |
![]() |
提出日時 | 2025-04-20 00:32:41 |
言語 | cLay (20241019-1) |
結果 |
WA
|
実行時間 | - |
コード長 | 249 bytes |
コンパイル時間 | 2,723 ms |
コンパイル使用メモリ | 191,828 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-04-20 00:32:45 |
合計ジャッジ時間 | 3,442 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 12 |
ソースコード
map<ll,ll>a; ll@n,@q; a[-1]=0; a[n]=n; rep(q){ ll@t,@x; auto i=a.lower_bound(-x); auto j=a.lower_bound(x); ll u=min(i->first+x+i->second,j->first-x+j->second); if(t==1){ wt(u); } if(t==2){ ll@c; if(c<u){ a[-x]=c; a[x]=c; } } }