英语翻译Description« acmnew » is a system which allows to create programming tasks in a simple and professional way.When you add a test to the problem,the corresponding form asks you for the test index.As in most cases it is clear which

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/27 23:42:15
英语翻译Description« acmnew » is a system which allows to create programming tasks in a simple and professional way.When you add a test to the problem,the corresponding form asks you for the test index.As in most cases it is clear which

英语翻译Description« acmnew » is a system which allows to create programming tasks in a simple and professional way.When you add a test to the problem,the corresponding form asks you for the test index.As in most cases it is clear which
英语翻译
Description« acmnew » is a system which allows to create programming tasks in a simple and professional way.When you add a test to the problem,the corresponding form asks you for the test index.As in most cases it is clear which index the next test will have,the system suggests the default value of the index.It is calculated as the smallest positive integer which is not used as an index for some previously added test.You are to implement this feature.Create a program which determines the default index of the next test,given the indexes of the previously added tests.
Input
The first line contains one integer n (1 ≤ n ≤ 100000) — the amount of previously added tests.The second line contains n distinct integers a1, a2, ..., an (1 ≤ ai ≤ 100000) — indexes of these tests.
Output
Output the required default value for the next test index.
Sample Input
31 7 2
Sample Output
3HINT

英语翻译Description« acmnew » is a system which allows to create programming tasks in a simple and professional way.When you add a test to the problem,the corresponding form asks you for the test index.As in most cases it is clear which
描述acmnew»是一个系统的«允许创建编程任务在一个简单的和专业的方式.当你添加一个测试的问题,相应的形式问你的试验指标.在大多数情况下,它是明确的,指数下一个测试将有,系统显示默认值的指数.它通过计算最小的正整数而不是作为一个索引对于一些先前添加的测试.你是来实现这个功能.创建一个计划,决定默认索引的下一次测试,考虑到先前添加的测试指标.InputThe第一行包含一个整数n(1≤n≤100000)——先前添加的测试的数量.第二行包含n个不同的整数a1,a2,……,一个(1≤≤100000 ai)——这些测试的指标.OutputOutput所需的默认值为下一个试验指标.示例输入