当前位置:网站首页>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 .
边栏推荐
- Collection | pytoch common loss function disassembly
- MySQL - index
- 90 后,辞职创业,说要卷死云数据库
- 仿网易云音乐小程序
- Etcd raft Based Consistency assurance
- What is the content of the securities practice examination?
- Pengcheng cup Web_ WP
- [secretly kill little buddy pytorch20 days -day02- example of image data modeling process]
- An expression that regularly matches one of two strings
- Quickly distinguish slices and arrays
猜你喜欢

A little understanding of GSLB (global server load balance) technology

Hcie security Day11: preliminarily learn the concepts of firewall dual machine hot standby and vgmp

treevalue——Master Nested Data Like Tensor

Mysql database ----- common commands of database (based on database)

Selenium has three waiting methods (forced waiting, implicit waiting, and display waiting)

运维各常用命令总结

Advanced collaboration: coroutinecontext

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

Getting started with postman -- environment variables and global variables

TiDB 之 TiCDC6.0 初体验
随机推荐
Notes on MySQL related knowledge points (startup, index)
Why use pycharm to run the use case successfully but cannot exit?
[gd32l233c-start] 5. FLASH read / write - use internal flash to store data
What is the difference between res.send() and res.end() in the node express framework
gslb(global server load balance)技術的一點理解
Global and Chinese market of recycled yarn 2022-2028: Research Report on technology, participants, trends, market size and share
Design e-commerce seckill system
内存分析器 (MAT)
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
Qualcomm platform WiFi update disconnect end open event
Pengcheng cup Web_ WP
MySQL——索引
[vulnhub shooting range] impulse: lupinone
Décompiler et modifier un exe ou une DLL non source en utilisant dnspy
使用dnSpy对无源码EXE或DLL进行反编译并且修改
浅析 Ref-NeRF
Summary of common operation and maintenance commands
University of Electronic Science and technology | playback of clustering experience effectively used in reinforcement learning
抓包整理外篇——————autoResponder、composer 、statistics [ 三]
Dahua series books