Description InputOutputSample Input1 2 1 54 2 8 9 3 1 2 3 2 56 60 3 59 59 57 3 51 55 59 5 1 2 3 2 4 4 87 70 81 34 4 50 55 58 59 6 1 2 3 4 5 6 6 1 2 3 3 4 5 8 1 2 3 3 4 2 5 4 9 22 23 52 61 39 38 1 40 17 Sample Output0 0 0 1 0 0 0 1 0 0 2 2 2 1 HintSourceSrm 308