In this post, the solution to the Next Test Codeforces is given. Here are the specifics of the question: Codeforces Beta Round #27 (Codeforces style, Division 2), problem: (A) Upcoming Test.
Next Codeforces Test Answer
#include<bits/stdc++.h>
using namespace std;
const int MOD=1000000007;
#define ll long long
#define Fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
int main()
{
Fastio;
ll n,x; cin>>n;
vector<ll> v(3005);
for(int i=0;i<n;i++)
{
cin>>x;
v[x]++;
}
for(ll i=1;i<v.size();i++)
{
if(v[i]==0)
{
cout<<i<<endl;
break;
}
}
}