TAP2014J  Distracted judges
[ The original version of this problem (in Spanish) can be found at http://dc.uba.ar/events/icpc/download/problems/tap2014problems.pdf ]
This problem was included in this contest at the last minute, replacing another one that the jury could not fully prepare in time. We will not tell you much about the original problem because we will use it for the contest next year. We will only say that it was called "Playing with lists" because it deals with integer lists. The input for the problem was formed by L lists of integers, and its format was:
 a line with an integer N_{1} indicating the amount of numbers in the first list;
 N_{1} lines each representing an integer in the first list;
 a line with an integer N_{2} indicating the amount of numbers in the second list;
 N_{2} lines each representing an integer in the second list;
...
 a line with an integer N_{L} indicating the amount of numbers in the last list;
 N_{L} lines each representing an integer in the last list.
In an unfortunate accident, Joaquin a member of the jury erased the first line of each input file (the one which contains N_{1}). We need your help to restore the input files so we can use the problem next year. Given the file without the first line, we ask you to tell us which are the possible values of N_{1} such that, if we add a line with that value at the beginning, the resulting file will be a valid input according to the description given above.
Input
The first line contains an integer T (1 ≤ T ≤ 10^{5}) which indicates the number of lines remaining in the input file. Each of the next T lines contains an integer R_{i} which represents the number left on the ith line of the input file after the accident (1 ≤ R_{i} ≤ 10^{5} for i = 1, 2, ... , T).
Output
Print a line for each possible value of N_{1}. Print all possible answers in increasing order.
Example 1
Input: 5 3 1 2 4 5 Output: 2 5
Example 2
Input: 10 1 2 3 4 5 6 7 8 9 10 Output: 1 4 10
hide comments
urimaj:
20190120 09:10:35
cin/cout with ios::sync_with_stdio(0); cin.tie(NULL); > TLE


Vipul Srivastava:
20150628 23:18:33
the output for


CoNtRaDiCtIoN:
20150614 09:52:40
for those getting wa try this


Maroof:
20150613 08:32:28
Was using 5000 instead of 10^5 as array size and got 3 SISGEVs . :( 

DHEERAJ KUMAR:
20150612 00:36:40
Nice problem :) a bit silly mistake costed me 1 WA 

Rishabh Joshi:
20150220 16:25:39
Easy! think simple.. 
Added by:  Fidel Schaposnik 
Date:  20140929 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Argentinian Programming Tournament 2014 