51nod 1007 正整数分组

传送门html 分析: 定义dp[i] == true 表示集合中的一些数能够组成i,则对于dp[i]只要dp[i-a[j]]有一个为真它就是真的。c++ 代码: #include <bits/stdc++.h> using namespace std; const int maxn = 1e3; int a[maxn]; bool dp[11000]; int main() { int
相关文章
相关标签/搜索