結果
問題 |
No.2927 Reverse Polish Equation
|
ユーザー |
👑 |
提出日時 | 2024-10-14 17:36:40 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 367 ms / 2,000 ms |
コード長 | 221 bytes |
コンパイル時間 | 2,906 ms |
コンパイル使用メモリ | 175,808 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-10-16 00:33:53 |
合計ジャッジ時間 | 9,693 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
ll@Q,@Y;ull A[Q],L;VS@S(Q);auto f=[&](ll x){L=0;for(auto&s:S)"0">s?A[L-2]+=A[L-1],--L:"m">s?A[L++]="X">s?stoi(s):x:(--L,"mi">s)?(A[L-1]>?=A[L]):(A[L-1]<?=A[L]);return *A;};Wt(f(Q=bsearch_min[ll,x,0,2Y](f(x)>=Y))==Y?Q:-1);