QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#294231 | #4825. Even and Odd Combinations | ucup-team866# | 0 | 0ms | 3900kb | C++14 | 424b | 2023-12-30 10:29:28 | 2023-12-30 10:29:29 |
answer
#include <bits/stdc++.h>
using namespace std;
int T, n, k, a[114];
int main() {
cin >> T;
while (T --) {
scanf ("%d%d", &n, &k);
for (int i=1; i<=k; i++) scanf ("%d", &a[i]);
if (a[1] == 1) {
printf ("%d %d\n", n, k - 1);
for (int i=2; i<=k; i++) printf ("%d ", a[i]); puts ("");
} else {
printf ("%d %d\n1", n, k + 1);
for (int i=1; i<=k; i++) printf (" %d", a[i]); puts ("");
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3900kb
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 3 3 1 2 3 3 1 1 3 1 2 3 1 3
result:
wrong answer 3rd lines differ - expected: '2 1', found: '2 -1'