I wanted help in atcoder educational DP contest Task T. I understand the whole idea of task and i had a confusion in the transition when the sign is > then according to editorial then are summing all the values will n including the j itself.
awoo comented on this which is
here
But i still dont get it how it is going to stop double counting. and whats the use of including the current digit j.When there is inequality.
thanks in advance.