It is giving stack overflow crash when i run in visual studio.
Can you please check my solution.
My Tilling problem solution is not working
Please check on above url, Thanks.
Run the code, plz check
@O17CPBTC0061 keep your memset function inside query loop and return your answer with modulo 10^9+7.
Changed memset inside the look and returned answer with modulo 10^9+7, but still getting the wrong answer.
Thanks a lot, i got it. 
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.