#include using namespace std; const int N = 1010; int b[N]; // 1、定义桶 /* 3 3 0 2 1 */ int main() { // 2、处理输入输出 int n, m; cin >> n >> m; // n:有n个同学,m:报了m次数 while (m--) { int x; cin >> x; b[x] = 1; } bool flag = false; for (int i = 0; i < n; i++) if (!b[i]) { flag = true; cout << i << " "; } if (!flag) { cout << n << endl; } return 0; }