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