STICKS - Editorial

cook71
editorial
greedy
simple
sticks

#12

Can anybody tell why I am getting WA ? link-https://www.codechef.com/viewsolution/10630873


#13

Hi,

This is my code
https://www.codechef.com/viewsolution/10630891

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

Thanks


#14

y am i getting WA in this solution? https://www.codechef.com/viewsolution/10632476


#15

https://www.codechef.com/viewsolution/10633288

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


#16

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. https://www.codechef.com/viewsolution/10624628


#17

@pada1211
Your code fails for
1 4 1 2 3 3


#18

https://www.codechef.com/viewsolution/10621220 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.


#19

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


#20

@sebastinsanty,

check the case

1

7

2 3 1 1 2 1 1

answer should be 2


#21

https://www.codechef.com/viewsolution/10644839 Can someone explain why am i getting WA


#22

Can somebody please tell me at what test i got wrong answer
https://www.codechef.com/viewsolution/10647330


#23

Please can anyone point out the error in my code- https://www.codechef.com/viewsolution/10793814


#24

https://www.codechef.com/viewsolution/10864425

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


#25

https://www.codechef.com/viewsolution/10867659

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


#26

https://www.codechef.com/viewsolution/10867659

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

ye I have taken few extra boolean flags :stuck_out_tongue:


#27

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:-

http://pastebin.com/NbKdECcb


#28

Please somebody help me, I am getting WA https://www.codechef.com/viewsolution/10935149


#29

Can anyone help me with my code https://www.codechef.com/viewsolution/11238582 . Getting wrong answer


#30

My Java implementation is giving me wrong answer although it’s working on eclipse. https://www.codechef.com/viewsolution/11248379
Please help!


#31

can anyone say me what is wrong with my output??
or which case did i miss
https://www.codechef.com/viewsolution/13211673