STICKS - Editorial



Can anybody tell why I am getting WA ? link-



This is my code

Can anyone please help me to tell why is this WA ?



y am i getting WA in this solution?


can someone help me with my code…? its coming as “time limit exceeded”…


Can anyone help with the code. I have included the square case too. But I don’t know why my solution is not getting accepted.


Your code fails for
1 4 1 2 3 3

#18 I cant seem to figure out whats wrong with my solution. It passes most of the test cases I can come up with.
Please help out. Thanks in advance :slight_smile:
PS: I looked through some solutions… They use the size of count array as 10000 whereas the mentioned size is 10^3 = 1000. Why is that so?
I tried both ways by the way. Still wrong answer.


This case gives Runtime error with your code :
4 4 3 3 3 3 1



check the case



2 3 1 1 2 1 1

answer should be 2

#21 Can someone explain why am i getting WA


Can somebody please tell me at what test i got wrong answer


Please can anyone point out the error in my code-


I am getting the required output, but its saying wrong answer :frowning:


Java Code: I am getting wrong answer for this, while its running perfectly on local compiler.

Yes i have taken some extra boolean flags ..:P


Java code: I am getting WA, but its running perfectly on my system.

ye I have taken few extra boolean flags :stuck_out_tongue:


As usual,although I have passed the given test cases,I cant seem to find the reason why my code is getting a WA!

Here’s the link to the code:-


Please somebody help me, I am getting WA


Can anyone help me with my code . Getting wrong answer


My Java implementation is giving me wrong answer although it’s working on eclipse.
Please help!


can anyone say me what is wrong with my output??
or which case did i miss