{"problem":{"name":"Mex","description":{"content":"You are given a sequence of length $N$ consisting of integers: $A=(A_1,\\ldots,A_N)$. Find the smallest non-negative integer not in $(A_1,\\ldots,A_N)$.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc245_b"},"statements":[{"statement_type":"Markdown","content":"You are given a sequence of length $N$ consisting of integers: $A=(A_1,\\ldots,A_N)$.\nFind the smallest non-negative integer not in $(A_1,\\ldots,A_N)$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 2000$\n*   $0 \\leq A_i \\leq 2000$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$A_1$ $\\ldots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc245_b","tags":[],"sample_group":[["8\n0 3 2 6 2 1 0 0","4\n\nThe non-negative integers are $0,1,2,3,4,\\ldots$.  \nWe have $0,1,2,3$ in $A$, but not $4$, so the answer is $4$."],["3\n2000 2000 2000","0"]],"created_at":"2026-03-03 11:01:14"}}