文件目录

#include <iostream>
using namespace std;
int main()
{
    int n, m, k;
    cin >> n >> m;
    int stu[1005] = {}, num = 0;
    while (m--)
    {
        cin >> k;
        if (stu[k])
            continue;
        stu[k] = 1;
        num++;
    }
    if (num == n)
        cout << n;
    else
    {
        for (int i = 0; i < n; i++)
        {
            if (!stu[i])
                cout << i << " ";
        }
    }
    return 0;
}