Getting a TLE.Please help

This is my code

hello @Gunit
image
a) in place of L it should be R.
b) k should be initialise with s.

https://ide.codingblocks.com/s/232347 Still getting a TLE

image

this should be m+1.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.