QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#511464#4825. Even and Odd Combinations42kangaroo0 0ms0kbC++20503b2024-08-09 22:19:482024-08-09 22:19:48

Judging History

你现在查看的是最新测评结果

  • [2024-08-09 22:19:48]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-08-09 22:19:48]
  • 提交

answer

//
// Created by 42kangaroo on 09/08/2024.
//
#include "bits/stdc++.h"

using namespace std;

signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	int t; cin >> t;
	while (t--) {
		int n, k; cin >> n >> k;
		vector<int> in(k);
		for (int i = 0; i < k; ++i) {
			cin >> in[i];
		}
		cout << "n ";
		if (in.empty() || in[0] != 1) cout << k + 1 << "\n1 ";
		else cout << k - 1 <<"\n";
		for (auto e: in) {
			if (e != 1) cout << e << " ";
		}
		cout << "\n";
	}
}

詳細信息

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:

n 1
1 
n 0

n 2
2 3 
n 0

n 2
1 2 
n 2
1 3 

input:


output:


result:

wrong output format Expected integer, but "n" found (test case 1)