結果
問題 |
No.3126 Dual Query Problem
|
ユーザー |
|
提出日時 | 2025-04-25 21:31:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 475 bytes |
コンパイル時間 | 2,056 ms |
コンパイル使用メモリ | 198,596 KB |
実行使用メモリ | 7,840 KB |
最終ジャッジ日時 | 2025-04-25 21:31:40 |
合計ジャッジ時間 | 8,990 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 OLE * 1 -- * 1 |
other | -- * 32 |
ソースコード
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using ll = long long; using pll = pair<ll, ll>; int i = 1; map<int, int> m; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, q; cin >> n >> q; while (n--) { int x; cin >> x; if (!m.count(x)) { cout << "1 " << i << " " << x << "\n"; m[x] = i++; q--; } cout << "2 " << m[x] << "\n"; q--; } while (q--) cout << "1 1 1\n"; }