Thank You Very Much

I was stuck on this question from 6 days !!!
but I am still taking 0.9 seconds ? shouldn’t it be 0.3-0.5 sec at most
It depends. You can also use \n in place of endl for printing newline
Yes, use \n instead of endl. endl is slower because it forces a flush, which actually unnecessary.
Yes now it is taking only 0.1 sec Thanks 
Thank You Very Much

Finally its accepted !!!
Nice qsn
Can someone please tell why i am getting WA for subtask 1… its giving right answer for every sample testcase mentioned in the editorial above and other combinations which comes into my mind too!
this code is for 15 points only
the sample test cases don’t help much, try all possible combinations, check the video on youtube
its working for the sample testcases mentioned in the editorial above and other combinations which came into my mind too
Let me try, if I get something I’ll post it
Sorry I tried, but couldn’t find the problem, Its a hard question
Anyone please help me with this code, I checked my solution with all the cases and it is giving all correct answers as compared to the correct solution. Please tell me that, is the problem occuring due to mod or is due to any other edge test case.
https://www.codechef.com/viewsolution/39667278
As a beginner, this problem taught me to first understand the problem thoroughly and to only dive into coding when I’m absolutely sure of its implementation! A big thanks to the Admin!
Any test-case on which my code goes wrong (only for 15pts). It will be really helpful. Thank you ![]()
https://www.codechef.com/viewsolution/39674365
You are not missing any test case.
You just need to print the sum as cout<<sum%mod<<endl;
mod=1000000007
Then also first sub-task should pass but it gives WA
it showing correct now
Can anyone help me to find out my mistake .It will be really helpful. Please…
https://www.codechef.com/viewsolution/39679731
i guess
Oh I thought it is some concept😅. BTW I used DP but only got 15 points, since it is using O(R) space which is 10^12, so it throws RuntimeError
I am so far not a great coder, looking at the question and after going through it I did get a know of almost all the edge cases but when i tried to code it… Ufff
The video editorial did help me understand the edge cases i missed but not how to go about the code…
Could anyone help me with a commented well written code please