結果
| 問題 |
No.3126 Dual Query Problem
|
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2025-04-25 21:26:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 824 bytes |
| コンパイル時間 | 4,421 ms |
| コンパイル使用メモリ | 256,088 KB |
| 実行使用メモリ | 10,596 KB |
| 最終ジャッジ日時 | 2025-04-25 21:27:29 |
| 合計ジャッジ時間 | 18,861 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 21 WA * 11 |
ソースコード
#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 4000000000000000001LL
int main(){
int N,Q;
cin>>N>>Q;
vector<int> x(N);
rep(i,N)cin>>x[i];
set<int> S;
vector<int> t,p,y;
rep(i,N){
if(!S.count(x[i])){
t.push_back(1);
p.push_back(x[i]);
y.push_back(x[i]);
S.insert(x[i]);
}
t.push_back(2);
y.push_back(x[i]);
p.push_back(0);
}
if(p.size() > Q){
cout<<"No"<<endl;
return 0;
}
cout<<"Yes"<<endl;
while(Q!=p.size()){
p.push_back(1);
y.push_back(1);
t.push_back(2);
}
rep(i,Q){
if(t[i]==1)cout<<t[i]<<' '<<p[i]<<' '<<y[i]<<endl;
else cout<<t[i]<<' '<<y[i]<<endl;
}
return 0;
}
沙耶花