- 博客(1)
- 收藏
- 关注
原创 SWUSTOJ:小偷的背包
在这里插入代码片 #include #include //可以重复使用 using namespace std; int a[1000]; int s(int weigh,int n) { if(weigh==0) return 1; //背包重量为零或者全部物品刚好等于重量 if(weigh<0||n<0) return 0;//背包重量太大或者太小 if(s(weigh-a[n]...
2019-05-02 23:25:55 439
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人