#P1247. Special Week With Positive Integers
Special Week With Positive Integers
题目描述
Please notice the shortage of the Memory limit!
Special Week is now just wondering the minimum positive integer which is not in the integer sequence. For example, if the sequence is [2,4,3,4] then the answer is obviously 1, if the sequence is [1,2,3,4] then the answer is obviously 5.
Please notice that there also are some negative integers in the sequence.
So, just given Special Week one integer sequence of integers. Please help her to find the minimum positive integer without the sequence.
输入格式
The first line contains one positive integer , indicating the length of the sequence.
The second line contains integers , the element in the sequence.
输出格式
One integer, the minimum positive integer without the sequence.
样例
4
2 4 3 4
1
4
1 2 3 4
5
4
-1 -2 -3 -4
1