Please help me with this code of SameSnake problem of snackdown 2017. Getting WA unable to figure out reason.

Edit 1: Code updated as per suggestions of sonu_628
Edit 2: Link updated sorry for inconvenience

try the test case
1 3 1 5
2 2 2 6
the answer should be NO
I hope you get your error



I can’t find anything wrong in it.

Plz help me find the bug. Appreciate it.

Thanks in advance.

Thanks fixed that error still WA. I believe you were pointing that x or y coordinate of both snake shall also be same.(s1y1==s2y1). New code still WA https://www.codechef.com/submit/complete/13785176

Its saying access denied, and hence we are unable to access your code. Please look into it to enable us to help further. :slight_smile:

@vijju123 Link has been updated sorry for inconvenience.

This is the problem.


1 Like

Thank you very much!!! That was the dumbest mistake I ever made.

haa :smiley: I made the similar mistake in the contest xD only figured out afterwards.