A. SubsetMex
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
2
4
0 3 0 3
5
4 1 0 2 0
Output
4
10