1055 The World's Richest(25 分)

编程入门 行业动态 更新时间:2024-10-09 06:27:57

1055 The <a href=https://www.elefans.com/category/jswz/34/1769196.html style=World's Richest(25 分)"/>

1055 The World's Richest(25 分)

1055 The World’s Richest(25 分)
Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but concentrate only on the people in a certain range of ages. That is, given the net worths of N people, you must find the M richest people in a given range of their ages.

Input Specification:
Each input file contains one test case. For each case, the first line contains 2 positive integers: N (≤10
​5
​​ ) - the total number of people, and K (≤10
​3
​​ ) - the number of queries. Then N lines follow, each contains the name (string of no more than 8 characters without space), age (integer in (0, 200]), and the net worth (integer in [−10
​6
​​ ,10
​6
​​ ]) of a person. Finally there are K lines of queries, each contains three positive integers: M (≤100) - the maximum number of output

更多推荐

1055 The World's Richest(25 分)

本文发布于:2024-02-07 02:45:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1752688.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:World   Richest

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!