Error report in input format


#1

what the hack man, this code is not working for the input :: 1000, 1000, 1000, 1000, 1001, 1002, 1003, 1003, 1004, 1010.
can someone plz help me out with this.


#2

Surprisingly it works for input like 0 0 0 0 1 2 3 3 4 10