|
|
вернуться в форумSimple DP DP[i][j][k] = count of sets of length i ending at number j with total gcd of k initialize with dp[1][n][n] = 1 for every n >= 2 && n <= s ans is summation of all dp[K][num][g] where g > 1 and num between 2 and s Edited by author 16.07.2021 18:48 Edited by author 16.07.2021 18:48 Edited by author 16.07.2021 18:48 |
|
|