随笔分类 - 动规-背包
摘要:Description 有n种不同大小的数字,每种各个。判断是否可以从这些数字之中选出若干使它们的和恰好为K。 Input 首先是一个正整数T(1<=T<=100)接下来是T组数据每组数据第一行是一个正整数n(1<=n<=100),表示有n种不同大小的数字第二行是n个不同大小的正整数ai(1<=ai
阅读全文
摘要:Problem Description Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had
阅读全文
摘要:题目: Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles
阅读全文
摘要:题目: Whuacmers use coins.They have coins of value A1,A2,A3…An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided
阅读全文
摘要:题目: The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they beco
阅读全文
摘要:讲道理这题真是背包问题中的水题,第一次写背包如此轻松。 题目: 不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前. 死亡骑士:”我要买道具!” 地精商人:”我们这里有三种道具,血瓶150块一个,魔
阅读全文