Let's call the roundness of the number the number of zeros to which it ends. You have an array of n numbers. You need to choose a subset of exactly k numbers so that the roundness of the product of the selected numbers will be maximum possible. Input…
设dp[i][j][k]表示前i个数中选j个并且因子含有k个2的能获得的最多的5的个数 则dp[i][j][k]=max(dp[i-1][j][k],dp[i-1][j-1][k-cnt2]+cnt5) 滚掉一维 #include <iostream> #include <cstring> #include <cstdio> using namespace std; typedef long long ll; int n, m, allcnt, dp[205][1200…
CF837D. Round Subset Let's call the roundness of the number the number of zeros to which it ends. You have an array of n numbers. You need to choose a subset of exactly k numbers so that the roundness of the product of the selected numbers will be ma…
D. Round Subset time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Let's call the roundness of the number the number of zeros to which it ends. You have an array of n numbers. You need to cho…