![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
01背包
文章平均质量分 79
暮雨rainy
这个作者很懒,什么都没留下…
展开
-
TOJ 2821.Grouping Problem
题目链接 01背包问题的变形,本题可以看成是一个容量为sum/2的背包问题,下面用动态规划解决,较为简洁#include <stdio.h> #include <algorithm> int main() { int v[8000]; int n,w[20]; while(scanf("%d",&n)&&n) { int sum=0;原创 2016-03-17 12:03:50 · 259 阅读 · 0 评论 -
TOJ 2838.The Eating Puzzle
题目链接:http://acm.tju.edu.cn/toj/showp2838.html 2838. The Eating Puzzle Time Limit: 1.0 Seconds Memory Limit: 65536K Total Runs: 1489 Accepted Runs: 776 Multiple test files原创 2016-09-16 01:05:58 · 388 阅读 · 0 评论