当前位置:网站首页>English topic assignment (28)
English topic assignment (28)
2022-07-03 21:40:00 【m0_ sixty-five million seven hundred and eighty-eight thousand 】
The original title is :
Milk
1000ms 32768K
describe :
Ignatius drinks milk everyday, now he is in the supermarket and he wants to choose a bottle of milk. There are many kinds of milk in the supermarket, so Ignatius wants to know which kind of milk is the cheapest.
Here are some rules:
1. Ignatius will never drink the milk which is produced 6 days ago or earlier. That means if the milk is produced 2005-1-1, Ignatius will never drink this bottle after 2005-1-6(inclusive).
2. Ignatius drinks 200mL milk everyday.
3. If the milk left in the bottle is less than 200mL, Ignatius will throw it away.
4. All the milk in the supermarket is just produced today.
Note that Ignatius only wants to buy one bottle of milk, so if the volumn of a bottle is smaller than 200mL, you should ignore it.
Given some information of milk, your task is to tell Ignatius which milk is the cheapest.
Input :
The input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow.
Each test case starts with a single integer N(1<=N<=100) which is the number of kinds of milk. Then N lines follow, each line contains a string S(the length will at most 100 characters) which indicate the brand of milk, then two integers for the brand: P(Yuan) which is the price of a bottle, V(mL) which is the volume of a bottle.
Output :
For each test case, you should output the brand of the milk which is the cheapest. If there are more than one cheapest brand, you should output the one which has the largest volume.
The sample input :
2 2 Yili 10 500 Mengniu 20 1000 4 Yili 10 500 Mengniu 20 1000 Guangming 1 199 Yanpai 40 10000
Sample output :
Mengniu Mengniu
( link :Milk | JXNUOJ)
translate :
milk
Ignatius Drink milk every day , He is in the supermarket now , I want to choose a box of milk . There are many kinds of milk in supermarkets , therefore Ignatius Want to know which kind of milk is the cheapest .
Here are some rules :
1. Ignatius Never drink milk produced six days or earlier . This means that if a kind of milk is 2005-1-1 production , Ignatius stay 2005-1-6 after ( Including the day ) You won't drink .
2. Ignatius Drink... Every day 200 ml .
3. If the bottle of milk is less than 200 ml , Ignatius Will throw it away .
4. The milk in the supermarket is produced only on the same day .
Be careful Ignatius Just want to buy A bottle of milk , Capacity less than 200 Milliliters are directly ignored .
I'll give you some information about milk , Your task is to tell him which kind of milk is the cheapest .
Input :
The input includes multiple test arrays . Enter an integer in the first line T, Represents the number of test groups . Next is T Group data .
For each test array , Enter an integer first N(1<=N<=100) Represents the number of types of milk . Next is N That's ok , Each line is a string S( Length not exceeding 100) Indicates the brand of milk , Followed by two integers :P(Yuan) Represents the price of each bottle ,V(ml) Represents the capacity of each bottle .
Output :
For each set of test data, you should output the brand of the cheapest milk . If there is more than one cheapest milk brand , Output the largest volume .
边栏推荐
- Getting started with postman -- built-in dynamic parameters, custom parameters and assertions
- Mysql - - Index
- @Transactional注解失效的场景
- @Scenario of transactional annotation invalidation
- 90 后,辞职创业,说要卷死云数据库
- Hcie security Day12: supplement the concept of packet filtering and security policy
- Qualcomm platform WiFi update disconnect end open event
- MySQL——数据库备份
- Such as the visual appeal of the live broadcast of NBA Finals, can you still see it like this?
- Hcie security Day11: preliminarily learn the concepts of firewall dual machine hot standby and vgmp
猜你喜欢

Mysql - - Index

How to choose cache read / write strategies in different business scenarios?

运维各常用命令总结

Talk about daily newspaper design - how to write a daily newspaper and what is the use of a daily newspaper?

Décompiler et modifier un exe ou une DLL non source en utilisant dnspy

90 后,辞职创业,说要卷死云数据库

Pengcheng cup Web_ WP
![Capturing and sorting out external articles -- autoresponder, composer, statistics [III]](/img/bf/ac3ba04c48e80b2d4f9c13894a4984.png)
Capturing and sorting out external articles -- autoresponder, composer, statistics [III]

使用dnSpy对无源码EXE或DLL进行反编译并且修改

全网都在疯传的《老板管理手册》(转)
随机推荐
No matter how hot the metauniverse is, it cannot be separated from data
Idea shortcut word operation
MySQL - SQL injection problem
Solve the problem that openocd fails to burn STM32 and cannot connect through SWD
Global and Chinese market of wireless hard disk 2022-2028: Research Report on technology, participants, trends, market size and share
A little understanding of GSLB (global server load balance) technology
Capturing and sorting out external articles -- autoresponder, composer, statistics [III]
Mysql database ----- common commands of database (based on database)
MySQL——JDBC
Let me ask you a question. Have you ever used the asynchronous io of Flink SQL to associate dimension tables in MySQL? I set various settings according to the official website
Ask and answer: dispel your doubts about the virtual function mechanism
Global and Chinese market of wall mounted kiosks 2022-2028: Research Report on technology, participants, trends, market size and share
Goodbye 2021, how do programmers go to the top of the disdain chain?
4. Data splitting of Flink real-time project
Transformation between yaml, Jason and Dict
Pengcheng cup Web_ WP
Monkey/ auto traverse test, integrate screen recording requirements
How PHP drives mongodb
Read the root directory of the folder, write txt and generate random samples
Software testing skills, JMeter stress testing tutorial, obtaining post request data in x-www-form-urlencoded format (24)