Need help in GIFTSRC

can anyone help me by pointing out why my solution giving WA in GIFTSRC
Here’s my solution:
https://www.codechef.com/viewsolution/30688138

Thankyou

Try:

2
1
L
1
R

Also '\n' should be at the end, not at the start.

I Tried it already, but still it gives WA

What was your answer for my test case?

-1 0
0 0

Is that correct? Now you have a testcase to find what you did wrong.

Thankyou very much for help

can you please give me some tips to observe solutions for wrong test cases

I really don’t know, but you should mostly initialise everything in your while loop always.

Noted , Thankyou