結果
| 問題 |
No.3126 Dual Query Problem
|
| コンテスト | |
| ユーザー |
リテモス
|
| 提出日時 | 2025-04-25 23:07:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 741 bytes |
| コンパイル時間 | 4,623 ms |
| コンパイル使用メモリ | 257,488 KB |
| 実行使用メモリ | 8,352 KB |
| 最終ジャッジ日時 | 2025-04-25 23:07:42 |
| 合計ジャッジ時間 | 16,420 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 1 WA * 31 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint998244353;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n,q; cin >> n >> q;
vector<int> a;
map<int,int> mp;
rep(i,n){
int num; cin >> num;
a.push_back(num);
if (mp.count(num)) continue;
else mp[num] = i+1;
}
if (mp.size()*2 > q){
cout << "No\n";
return 0;
}
int cnt = 0;
for (auto p : mp){
cnt++;
cout << 1 << " " << cnt << " " << p.first << "\n";
}
while(cnt <= q-a.size()){
cnt++;
cout << 1 << " " << cnt << " " << 100 << "\n";
}
for (auto num : a){
cout << 2 << " " << mp[num] << "\n";
}
return 0;
}
リテモス