Baidu Star Programming Competition - the troubles of rice groups (solution)

xiaoxiao2021-03-30  204

"Lunch Group" is the largest civil organization in Baidu's internal participation. In the same department, the same university, the same year is born, employees using the same model computer always organize a variety of long-term, temporary rice groups.

Participate in the rice group, not only you can taste more rich dishes with preferential prices, but also enhance your feelings with colleagues when you eat. However, as Baidu's employees have more and more, the management of each rice group has become more complex. Especially in order to take care of the employees increasingly picky stomach, the pressure of the head of the rice group is getting bigger and bigger. Now, this task is handed over to "Baidu Star", because you will have an automatic à la carte algorithm for all Baidu rice groups.

The demand for rice group is as follows: 1. The economy is a factor we have to consider, and it is necessary to make full use of Baidu employee's lunch subsidies, and we can not palate waste. Therefore, we hope that the last per capita fee is, the better. 2. It is another factor we have to consider. For the sake of simplicity, we will attribute the properties of various dishes into a leeks, vegetarians, spicy, light, and only once each dish. 3. Please remember that Baidu Ren Group enjoys a 20% discount on major restaurants.

Enter the requirements: 1. The first line of input data contains three integers n, m, k (0

Output requirements: For each set of test data, the output data contains m 1 rows, and the front M row contains a dish name (in order to sort in the order of the original menu). The M 1 line is per capita consumption, and the results remain two decimals. Example: Douquin Chicken Swing Tofu 12.00 Sample: Out.txt

Rules: 1. The program will run on a Linux machine (memory usage is not strictly limited), and it cannot be more than 10 seconds in each test case, otherwise the usage case is unable; 2. The program is required to read the data file in the form of the input sample, and the run results are output to the standard output according to the format of the output sample. If data and output data cannot be read correctly, the title will not be scored; 3. This topic has 5 test cases, each test case for an input file. The ratio of each test case accounted for 20%, 20%, 20%, 20%, 20%, respectively; 4. This topic is 10 points.

转载请注明原文地址:https://www.9cbs.com/read-130570.html

New Post(0)