QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#292960 | #4825. Even and Odd Combinations | ucup-team1447# | 0 | 1ms | 3528kb | C++14 | 682b | 2023-12-28 17:47:12 | 2023-12-28 17:47:13 |
answer
// This Code was made by Chinese_zjc_.
#include <bits/stdc++.h>
int T, n, k;
signed main()
{
std::ios::sync_with_stdio(false);
std::cin >> T;
while (T--)
{
long long ans = 0;
std::vector<int> g;
std::cin >> n >> k;
for (int i = 0, c; i != k; ++i)
std::cin >> c, ans ^= 1ll << c >> 1;
ans ^= 1;
for (int i = 0; i != n; ++i)
if (ans >> i & 1)
g.push_back(i + 1);
std::cout << n << ' ' << g.size();
for (int i = 0; i != int(g.size()); ++i)
std::cout << " \n"[i == 0] << g[i];
std::cout << std::endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3528kb
input:
6 3 0 2 1 1 3 3 1 2 3 3 1 1 3 1 2 3 1 3
output:
3 1 1 2 0 3 2 2 3 3 0 3 2 1 2 3 2 1 3
input:
6 3 1 1 2 0 3 2 2 3 3 0 3 2 1 2 3 2 1 3
output:
3 0 2 1 1 3 3 1 2 3 3 1 1 3 1 2 3 1 3
result:
wrong answer 2nd lines differ - expected: '', found: '2 1'