結果
| 問題 | No.3126 Dual Query Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-25 21:31:07 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 475 bytes |
| 記録 | |
| コンパイル時間 | 1,135 ms |
| コンパイル使用メモリ | 216,652 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-10 06:18:53 |
| 合計ジャッジ時間 | 7,004 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 OLE * 1 -- * 1 |
| other | -- * 33 |
ソースコード
#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";
}