結果
問題 | No.2927 Reverse Polish Equation |
ユーザー |
👑 |
提出日時 | 2024-10-14 16:39:07 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 331 ms / 2,000 ms |
コード長 | 218 bytes |
コンパイル時間 | 3,134 ms |
コンパイル使用メモリ | 175,880 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-10-16 00:32:46 |
合計ジャッジ時間 | 9,363 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
ll@Q,@Y,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,Y+1](f(x)>=Y))==Y?Q:-1);