what is the wrong in my solution I checked with test cases also all answers are matching the outpu.
Even my progam is correct I am getting only 50 %
consider a test case like
3
5 5 4
3
7 7 8
the answer you get is 3, 3, 2, END but it should be 1, 3, 3, 2, END
correct this