Yet Another Number Sequence

Problem Number: 
10 689
Type of Problem: 
Problem Category: 
Input: 
Random Input
0
0
Critical Input: 
Random Input: 
16 0 1 14 1 0 1 24 1 0 1 74 1 25 67 3 1 98 25 1000000000 1 0 1 9842 2 34 88 224242 2 100 100 10 2 56 24 83943 3 89 14 983821 3 1 100 1000000000 4 45 64 999999999 4 0 0 100000 4 100 90 0 4 41 67 1 3 55 89 2 4
Problem Id: 
10689