y

杨书蘅  •  12小时前


include <bits/stdc++.h>

using namespace std; int a[1001];

int main() {

int n, m;
cin >> n >> m;
for (int i = 0; i < m; i++) {
	int x;
	cin >> x;
	a[x]++;
}
int cnt = 0;
for (int i = 0; i < n; i++) {
	if (a[i] == 0) {
		cout << i << " ";
		cnt++;
	}
}
if (cnt == 0) {
	cout << n;
}
return 0;

}


评论:

请先登录,才能进行评论