Help needed in Atcoder Educational DP task T permutations.

Revision en1, by Chx_ini, 2024-01-27 21:25:36

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

img 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.

Tags dp, beginner, help me, dynamic programming, atcoder educational dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Chx_ini 2024-01-27 21:25:36 868 Initial revision (published)