http://www.codechef.com/viewsolution/4572925
plz give me some test cases at which my code is giving wrong answer
2 10
1 2 3 1 3 1 3 1 3 2 2 2 2 2
correct ans = 4
3 20
7 5 1 2 5 3 5 4 2 3 5 3 2 1 2 5 1 7 5 1
correct ans = 9
3 31
7 11 17 10 7 10 2 9 2 18 8 10 20 10 3 20 17 17 17 1 15 10 8 3 3 18 13 2 10 10 11
output 18
source - editorial
give me cases according to the pattern(vertical not everything horizontal) specified in the question itself…
because its not understandable…
do printing an extra space gives wrong answer??