DescriptionInputOutputSample Input5 1 1 2 1 0 1 1 0 0 0 2 3 3 3 3 3 1 1 3 3 3 1 2 2 1 -6 -6 -9 -6 -2 -3 -8 -7 -2 -3 -5 0 -9 -3 -4 1 -4 -7 -7 -6 -7 -2 -3 -2 -8 4 5 0 6 4 5 0 5 2 0 0 4 6 4 3 6 10 8 9 2 10 7 3 1 9 Sample Output60HintSourcePku 2753