#181. 例题1:丢失的数字
例题1:丢失的数字
题目描述
给你m个1到n之间的整数,你能找出1到n中的哪些整数没有出现吗?输入格式
第一行2个整数n,m,直接用空格分隔(1 <= n <= 100000, m < n),表示有m个1到n之间的整数。 接下来m行,每行一个整数ai(1 <= ai <=n,数据保证m个数都不相同)。输出格式
每行1个数,从小到大输出输入数据中没有出现过的1到n中的整数。5 3
3
1
42
5
5 3
3
1
42
5
By signing up a 大飞信奥 universal account, you can submit code and join discussions in all online judging services provided by us.