Hi Everone , I tried problem https://community.topcoder.com/stat?c=problem_statement&pm=9728 , not able to comeup with any proper logic . I checked the editorial also, solution is not clear could someone help to understand how to approach this problem .
Any reasons for downvote ?
I didn't downvote you so I'm just guessing:
If you want help, please make some effort to obtain it. Helping with problems takes time. Some people (including myself) are willing to sacrifice their time to help others, but you should make sure that the time taken is as small as possible. I have better things to do than look for editorial, which you have link to but for some reason didn't share it.
It is also very demotivating if I elaborate on some thing and it turns out this is the part you understood but you missed something else. This way I have wasted my time and you still didn't find the answer. Please indicate what you need.
Note that this rant is very general. You didn't ask the question in a worse way than others usually do (but not in a better way as well). Don't take this personally. You just happened to explicitly ask for the reason and I happened to have a few minutes to answer.
Sure i will follow above strategy,i will try to explain all the things and where i was facing problems . Thanks ania for pointing out the mistakes