01背包求方案数裸题, 将所有的歌的长度都存到a数组中, 遍历a数组,一重循环遍历物品, 二重循环遍历空间 #include <iostream> #include <cstring> #include <algorithm> #include <cmath> using namespace std; const int N = 10010,mod = 1000000007; int k, A, X, B, Y; long long f[N]; int a[N]; int main() {...