QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#511475 | #4825. Even and Odd Combinations | ursus | 0 | 0ms | 0kb | C++14 | 687b | 2024-08-09 22:30:51 | 2024-08-09 22:30:53 |
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
using vec = vector<int>;
using vvec = vector<vec>;
using bvec = vector<bool>;
using pii = pair<int,int>;
#define VECT(T) vector<T>
#define PRINT(vector) for(auto ele : vector) cout << ele << " "; cout << "\n";
constexpr int E9 = 1e9 + 7;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while(t--) {
int n, k;
cin >> n >> k;
set<int> s;
for(int i = 0 ; i < k ; ++i) {
int a; cin >> a;
s.insert(a);
}
if(s.count(1)) s.erase(1);
else s.insert(1);
for(auto a : s) cout << a << " ";
cout << endl;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer on the first run
input:
6 3 0 2 1 1 3 3 1 2 3 3 1 1 3 1 2 3 1 3
output:
1 2 3 1 2 1 3
input:
output:
result:
wrong answer Integer parameter [name=n] equals to 1, violates the range [3, 3] (test case 1)