結果
| 問題 |
No.3198 Monotonic Query
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-11 21:28:47 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 252 ms / 3,000 ms |
| コード長 | 393 bytes |
| コンパイル時間 | 3,296 ms |
| コンパイル使用メモリ | 279,272 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-07-12 10:50:35 |
| 合計ジャッジ時間 | 9,800 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#include <atcoder/segtree>
int op(int x,int y){
return max(x,y);
}
int e(){
return 0;
}
int main(){
int q;
cin>>q;
atcoder::segtree<int,op,e> st(q);
int t=0;
while(q--){
int tt;
cin>>tt;
if(tt==1){
int x;
cin>>x;
st.set(t,x);
t++;
}else{
int k;
cin>>k;
cout<<st.prod(t-k,t)<<endl;
}
}
}