This is my code: https://ideone.com/Tm2zsH i got wrong when i try to submit 15 time. someone can help me to check my error :’(. http://www.spoj.com/problems/STPAR/
I can give you a test case where you give the wrong answer:
5 5 3 2 1 4
answer should be yes.