杭电2602--Bone Collector(01背包…
来源:互联网 发布:数据采集卡原理设计 编辑:程序博客网 时间:2024/06/06 16:06
Problem Description
Many years ago , in Teddy’s hometown there was aman who was called “Bone Collector”. This man like to collectvaries of bones , such as dog’s , cow’s , also he went to the grave…
The bone collector had a big bag with a volume of V ,and along histrip of collecting there are a lot of bones , obviously , differentbone has different value and different volume, now given the eachbone’s value along his trip , can you calculate out the maximum ofthe total value the bone collector can get ?
Input
The first line contain a integer T , the number ofcases.
Followed by T cases , each case three lines , the first linecontain two integer N , V, (N <= 1000 , V<= 1000 )representing the number of bones and thevolume of his bag. And the second line contain N integersrepresenting the value of each bone. The third line contain Nintegers representing the volume of each bone.
Output
One integer per line representing the maximum ofthe total value (this number will be less than 231).
Sample Input
1
5 10
1 2 3 4 5
5 4 3 2 1
Sample Output
14
# include<stdio.h>
# include<string.h>
int f[2000],V;
void ZeroOnePack(int cost,int weight)
{
}
int main()
{
}
- 杭电2602--Bone Collector(01背包…
- HDU--杭电--2602--Bone Collector--背包
- 杭电ACM 2602 Bone Collector背包
- 杭电OJ2602--------Bone Collector---------01背包
- ACM 杭电hdu 2602 Bone Collector(01背包)
- Bone Collector(杭电2602)(01背包)
- 杭电 2602 bone collector (01背包)
- 杭电2602Bone Collector(01背包)
- 【杭电oj】2602 - Bone Collector(01背包)
- 杭电2602 Bone Collector(01背包)
- 杭电-2602 Bone Collector(01背包模板)
- 背包问题—杭电2602 Bone Collector
- 杭电 2602 Bone Collector(背包问题 )
- Bone Collector HDU杭电2602 【0-1背包】
- 杭电 2603 Bone Collector(简单01背包)
- 杭电2602-Bone Collector
- 杭电 2602 Bone Collector
- 杭电 2602 Bone Collector
- 黑马程序员-day05-面向对象(封装 Encapsulation)
- 杭电1159——Common Subsequence
- 杭电1087--Super Jumping! Jumping…
- iOS中Block介绍(一)基础
- 杭电1059--Dividing(多重背包一)
- 杭电2602--Bone Collector(01背包…
- 杭电1171--Big Event in HDU(多重…
- poj1315--Don't Get Rooked(DPS)
- 杭电1085--Holding Bin-Laden Capt…
- 1, 10, 100, 1000...
- 杭电1016--Prime Ring Problem(DF…
- 杭电1163--Eddy's digital Roots(…
- 链表的相关操作
- 杭电1998--奇数阶魔方(模拟)