I don’t know where my test case is failing . Can anybody check it ?
https://www.codechef.com/viewsolution/34887018
There are two conditions that you have to check.
- The greatest number should not occur twice
- Any number should not occur thrice.
I have implemented the same logic in my solution.
If you want you may have a look and then debug. I thinks it is understandable.
Cheers.