close

https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4379

 

#include <iostream>

using namespace std;

int main(){

    int N, R, tmp;

    while (cin >> N >> R){

        bool r[10001]= {0};

        for (int i = 0; i < R; i++){

            cin >> tmp;

            r[tmp] = true;

        }

        if (N == R)

            cout << "*" << endl;

        else 

        {

            for (int i = 1; i <= N; i++)

            {

                if (!r[i])

                    cout << i << " ";

            }

            cout << endl;

        }

    }

    return 0;

}

arrow
arrow
    文章標籤
    一顆星
    全站熱搜

    楓綺 發表在 痞客邦 留言(0) 人氣()