Introduction - If you have any usage issues, please Google them yourself
/*
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 ~