ACM HDU2844 coin combination problem, I converted the problem to 01 backpack, but I do n’t know why I just wa ... 1 Comment / default / By huanggs
Lorena December 5, 2022 at 7:11 am The arrays of W and DP are not large enough, and the size of 10^5 is required. After changing it, TLE // tle#include u003CiOSTREAM> #include u003Calgorithm> userSpacestd;#DefineMaxm100010#DEFINEMAXN101Ig (Intmag *ARGV []) {intn, m, i, j, count, count1; intv [maxn], num [maxn]; intw [maxm], dp [maxm]; about ("%d%d", Log in to Reply
The arrays of W and DP are not large enough, and the size of 10^5 is required. After changing it, TLE
// tle#include u003CiOSTREAM> #include u003Calgorithm> userSpacestd;#DefineMaxm100010#DEFINEMAXN101Ig (Intmag *ARGV []) {intn, m, i, j, count, count1; intv [maxn], num [maxn]; intw [maxm], dp [maxm]; about ("%d%d",