当前位置:网站首页>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 .
边栏推荐
- 使用dnSpy對無源碼EXE或DLL進行反編譯並且修改
- Xai+ network security? Brandon University and others' latest "interpretable artificial intelligence in network security applications" overview, 33 page PDF describes its current situation, challenges,
- Intimacy communication -- [repair relationship] - use communication to heal injuries
- [vulnhub shooting range] impulse: lupinone
- Imitation Netease cloud music applet
- Control loop of program (while loop)
- MySQL——SQL注入问题
- Leetcode daily question 540 A single element in an ordered array Valentine's Day special article looking for a single dog in a pile of lovers ~ the clown is myself
- MySQL——索引
- Après 90 ans, j'ai démissionné pour démarrer une entreprise et j'ai dit que j'allais détruire la base de données Cloud.
猜你喜欢
Minio deployment
Teach you how to install aidlux (1 installation)
Decompile and modify the non source exe or DLL with dnspy
Hcie security Day10: six experiments to understand VRRP and reliability
Capture de paquets et tri du contenu externe - - autoresponder, composer, statistiques [3]
Talk about daily newspaper design - how to write a daily newspaper and what is the use of a daily newspaper?
@Scenario of transactional annotation invalidation
Après 90 ans, j'ai démissionné pour démarrer une entreprise et j'ai dit que j'allais détruire la base de données Cloud.
Design e-commerce seckill system
90 后,辞职创业,说要卷死云数据库
随机推荐
TiDB 之 TiCDC6.0 初体验
@Transactional注解失效的场景
MySQL - database backup
Analyse de REF nerf
Kubernetes abnormal communication network fault solution ideas
The White House held an open source security summit, attended by many technology giants
MySQL——JDBC
Selenium has three waiting methods (forced waiting, implicit waiting, and display waiting)
MySQL——JDBC
运维各常用命令总结
Nmap and masscan have their own advantages and disadvantages. The basic commands are often mixed to increase output
Advanced collaboration: coroutinecontext
同花顺开户注册安全靠谱吗?有没有风险的?
Teach you how to install aidlux (1 installation)
Goodbye 2021, how do programmers go to the top of the disdain chain?
淺析 Ref-NeRF
Tidb's initial experience of ticdc6.0
常用sql集合
leetcode-540. A single element in an ordered array
Why use pycharm to run the use case successfully but cannot exit?