文件名称:C
-
所属分类:
- 标签属性:
- 上传时间:2014-06-13
-
文件大小:6.38kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
第四届华为杯程序设计竞赛C题。问题输入
输入包括多个行:第1行给出参赛团体总数N、需要查询成绩的参赛团队数;接下来有N行,每一行先后给出参赛团体的队名和最终排名;接下来有M行,每一行给出需要查询排名的参赛团队的队名或者需要查询参赛团体队名的排名。这里1≤N<10000,1≤M≤1000000。
问题输出
对应输入中最后M行要查询排名的参赛团队的队名或者需要查询参赛团体队名的排名,输出M行,每一行给出要查询的相应参赛团队队名、排名,以一个空格分隔上述两项内容。
样例输入
4 3
2014089 2
2014028 1
2014001 4
2014002 3
2014002
2
2014028
样例输出
2014002 3
2014089 2
2014028 1
-
Problem input
Inputs include multiple lines: Line 1 shows the total number of participating groups N, the number of participating teams need to query results following N lines, each participating group has given the team name and the final ranking Then there are M lines, each line given query requires participating teams ranked team name or team name needs to query participating groups in the rankings. Where 1 ≤ N <10000,1 ≤ M ≤ 1000000.
Problem Output
The last M rows corresponding to the input query participating teams ranked team name or team name needs to query participating organizations rankings, output M lines, each participating team is given the appropriate team name to query, rankings, the two separated by a space item content.
输入包括多个行:第1行给出参赛团体总数N、需要查询成绩的参赛团队数;接下来有N行,每一行先后给出参赛团体的队名和最终排名;接下来有M行,每一行给出需要查询排名的参赛团队的队名或者需要查询参赛团体队名的排名。这里1≤N<10000,1≤M≤1000000。
问题输出
对应输入中最后M行要查询排名的参赛团队的队名或者需要查询参赛团体队名的排名,输出M行,每一行给出要查询的相应参赛团队队名、排名,以一个空格分隔上述两项内容。
样例输入
4 3
2014089 2
2014028 1
2014001 4
2014002 3
2014002
2
2014028
样例输出
2014002 3
2014089 2
2014028 1
-
Problem input
Inputs include multiple lines: Line 1 shows the total number of participating groups N, the number of participating teams need to query results following N lines, each participating group has given the team name and the final ranking Then there are M lines, each line given query requires participating teams ranked team name or team name needs to query participating groups in the rankings. Where 1 ≤ N <10000,1 ≤ M ≤ 1000000.
Problem Output
The last M rows corresponding to the input query participating teams ranked team name or team name needs to query participating organizations rankings, output M lines, each participating team is given the appropriate team name to query, rankings, the two separated by a space item content.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
C.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.