文件名称:source
-
所属分类:
- 标签属性:
- 上传时间:2014-01-18
-
文件大小:1.45kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
/*
功能:
输入参数:int*p 指向二维数组的首地址,该二维数组第0行的两个数分别表示:总钱数<30000,和希望购买物品的个数<25
该数组从第1行到第m行(1<=j<=m)中给出了编号为j的物品的基本数据,每行有2个非负整数,
表示该物品的价格(<=10000)和该物品的重要度(1~5)。
GetResult表示不超过总钱数的物品的价格与重要度乘积的总和的最大值(<100000000)。
不需做入参检查,测试用例可以保证~
例如:4000 8(第0行)
821 3 (第1行)
422 5
458 5
500 3
200 2
430 4
530 3
239 3
则表示 总钱数为4000,希望购买物品个数为8个,因此从第1行到第8行表示编号为j的物品的价格及物品的重要度。
返回值:无
*/-/*
Features:
Input Parameters: int* p points to the first address of a two-dimensional array, the number of the two-dimensional array of row 0, respectively: total amount of money <30,000, and wants to buy the number of items <25
The array from the first row to row m (1 <= j <= m) gives the number of basic data items j, each line has two non-negative integers,
Indicates the price of the item (<= 10000) and the importance of the item (1-5).
Rates and said maximum degree of importance GetResult not exceed the total amount of money of the sum of the product of the article (<100000000).
The Senate did not need to check, test cases can guarantee ~
功能:
输入参数:int*p 指向二维数组的首地址,该二维数组第0行的两个数分别表示:总钱数<30000,和希望购买物品的个数<25
该数组从第1行到第m行(1<=j<=m)中给出了编号为j的物品的基本数据,每行有2个非负整数,
表示该物品的价格(<=10000)和该物品的重要度(1~5)。
GetResult表示不超过总钱数的物品的价格与重要度乘积的总和的最大值(<100000000)。
不需做入参检查,测试用例可以保证~
例如:4000 8(第0行)
821 3 (第1行)
422 5
458 5
500 3
200 2
430 4
530 3
239 3
则表示 总钱数为4000,希望购买物品个数为8个,因此从第1行到第8行表示编号为j的物品的价格及物品的重要度。
返回值:无
*/-/*
Features:
Input Parameters: int* p points to the first address of a two-dimensional array, the number of the two-dimensional array of row 0, respectively: total amount of money <30,000, and wants to buy the number of items <25
The array from the first row to row m (1 <= j <= m) gives the number of basic data items j, each line has two non-negative integers,
Indicates the price of the item (<= 10000) and the importance of the item (1-5).
Rates and said maximum degree of importance GetResult not exceed the total amount of money of the sum of the product of the article (<100000000).
The Senate did not need to check, test cases can guarantee ~
(系统自动生成,下载前可以参看下载内容)
下载文件列表
source/OJ.cpp
source/OJ.h
source/
source/OJ.h
source/
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.