結果
問題 |
No.3198 Monotonic Query
|
ユーザー |
|
提出日時 | 2025-07-11 22:29:15 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 481 bytes |
コンパイル時間 | 3,431 ms |
コンパイル使用メモリ | 276,588 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-07-11 22:29:58 |
合計ジャッジ時間 | 40,965 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 TLE * 1 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { int q; cin >> q; vector<int> a; rep(qi, q) { int type; cin >> type; if (type == 1) { int x; cin >> x; a.push_back(x); } else { int k; cin >> k; cout << *max_element(a.end()-k, a.end()) << '\n'; } } return 0; }