返回小组 开始 2022-08-19 14:00:00

呈贡B班测试2

结束 2022-08-19 16:00:00
Contest is over.
当前 2024-11-25 09:14:14

1

include <bits/stdc++.h>

using namespace std; int a, n[1005], b, k;

int main() {

cin >> a;
k = a;
for (int i = 1; i <= a; i++) {
	cin >> b;
	n[b]++;
	if (n[b] != 1 && n[b] != 0) {
		n[b] = 1;
		k--;
	}
}
cout << k << endl;
for (int i = 1; i <= 1000; i++) {
	if (n[i] == 1) {
		cout << i << ' ';
	}
}

return 0;

}


lzcl  •  2年前

比赛已结束。