looks good ^^
A basic brute force kind of approach worked as well. here is the solution.
Thanks for your feedback! I see, i missed things in implementation. Thought process was same, but yes, i was at fault in implementation. I will make sure to give it another shot with your explanation in mind, THANKS!!
(Regarding array, i heard it gives a warning but initialises elements to 0. Nonetheless, its better to avoid risky things, undefined behaviour in program is a HUGE headache to debug…)
I believe there was discussion on this in codeforces.
Can anyone please tell me how to increase karma points? I can’t even ask questions
Thanks for the reference! I will keep that in mind in future!! Thanks again dear