当前位置:网站首页>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 .
边栏推荐
- Tidb's initial experience of ticdc6.0
- Global and Chinese market of telematics boxes 2022-2028: Research Report on technology, participants, trends, market size and share
- Advanced technology management - how to examine candidates in the interview and increase the entry probability
- 抓包整理外篇——————autoResponder、composer 、statistics [ 三]
- 抓包整理外篇——————autoResponder、composer 、statistics [ 三]
- 十大券商开户注册安全靠谱吗?有没有风险的?
- Control loop of program (while loop)
- A little understanding of GSLB (global server load balance) technology
- @Transactional注解失效的场景
- 仿网易云音乐小程序
猜你喜欢

Single page application architecture

Collections SQL communes

MySQL - index
![[Yugong series] go teaching course 002 go language environment installation in July 2022](/img/47/35b4fb0354122e233977b261ef405b.png)
[Yugong series] go teaching course 002 go language environment installation in July 2022

Install and use Chrony, and then build your own time server

UI automation test: selenium+po mode +pytest+allure integration

技术管理进阶——如何在面试中考察候选人并增大入职概率

MySQL——JDBC

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

Xai+ network security? Brandon University and others' latest "interpretable artificial intelligence in network security applications" overview, 33 page PDF describes its current situation, challenges,
随机推荐
Netfilter ARP log
Persistence of Nacos
Capturing and sorting out external articles -- autoresponder, composer, statistics [III]
flink sql-client 退出,表就会被清空怎么办?
Is it OK for fresh students to change careers to do software testing? The senior answered with his own experience
A little understanding of GSLB (global server load balance) technology
Remember the experience of automatically jumping to spinach station when the home page was tampered with
Station B, dark horse programmer, employee management system, access conflict related (there is an unhandled exception at 0x00007ff633a4c54d (in employee management system.Exe): 0xc0000005: read locat
Sort out several network request methods of JS -- get rid of callback hell
MySQL——数据库备份
17 websites for practicing automated testing. I'm sure you'll like them
浅析 Ref-NeRF
Qualcomm platform WiFi update disconnect end open event
Dahua series books
Solve the problem that openocd fails to burn STM32 and cannot connect through SWD
QFileDialog
内存分析器 (MAT)
Baohong industry | good habits that Internet finance needs to develop
"Designer universe" argument: Data Optimization in the design field ultimately falls on cost, safety and health | chinabrand.com org
University of Electronic Science and technology | playback of clustering experience effectively used in reinforcement learning