五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊

編程每日刷題系列二(PAT Ranking)

2021-02-08 17:18 作者:Eric_Richard  | 我要投稿

PAT Ranking?

題目描述

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists will be merged immediately after the test. Now it is your job to write a program to correctly merge all the ranklists and generate the final rank.

編程能力測試(PAT)是由浙江大學(xué)計(jì)算機(jī)科學(xué)與技術(shù)學(xué)院組織的。每個(gè)測試應(yīng)該同時(shí)在幾個(gè)地方運(yùn)行,并且在測試之后,排名列表將立即合并。現(xiàn)在,你的工作是編寫一個(gè)程序來正確地合并所有的排名,并生成最終的排名。

Input Specification:

Each input file contains one test case. For each case, the first line contains a positive number?N?(≤100), the number of test locations. Then?N?ranklists follow, each starts with a line containing a positive integer?K?(≤300), the number of testees, and then?K?lines containing the registration number (a 13-digit number) and the total score of each testee. All the numbers in a line are separated by a space.

每個(gè)輸入文件包含一個(gè)測試用例。對于每種情況,第一行包含一個(gè)正數(shù)N(100),即考試位置的數(shù)量。然后是N份排名列表,每一份列表都以正整數(shù)K(300)、考生人數(shù)一行開頭,然后是準(zhǔn)考證號(13位數(shù)字)和考生考試總分在K行開頭。一行中的所有數(shù)字用空格隔開。

Output Specification:

For each test case, first print in one line the total number of testees. Then print the final ranklist in the following format:

registration_number final_rank location_number local_rank

The locations are numbered from 1 to?N. The output must be sorted in nondecreasing order of the final ranks. The testees with the same score must have the same rank, and the output must be sorted in nondecreasing order of their registration numbers.

對于每個(gè)測試用例,首先在一行中打印測試者的總數(shù)。然后以如下格式打印最終排名:

準(zhǔn)考證號 最終排名?考場號?考場內(nèi)排名

位置編號從1到n,輸出必須按最終排名的非降序排序。相同分?jǐn)?shù)的考生必須有相同的排名,并且輸出必須按他們的準(zhǔn)考證號的非降序排序。

Sample Input:

Sample Output:

參考代碼如下(但是先動(dòng)腦筋思考如何做)

C++代碼:

樣例運(yùn)行結(jié)果如下:

之后我會(huì)持續(xù)更新,如果喜歡我的文章,請記得一鍵三連哦,點(diǎn)贊關(guān)注收藏,你的每一個(gè)贊每一份關(guān)注每一次收藏都將是我前進(jìn)路上的無限動(dòng)力 ?。?!↖(▔▽▔)↗感謝支持!



編程每日刷題系列二(PAT Ranking)的評論 (共 條)

分享到微博請遵守國家法律
新宾| 修文县| 临清市| 宿迁市| 青海省| 嘉定区| 南陵县| 新竹市| 肇源县| 南雄市| 马边| 南投市| 错那县| 阜南县| 金塔县| 庄河市| 凤城市| 江油市| 永济市| 高邑县| 行唐县| 天峻县| 白水县| 酒泉市| 永兴县| 屏山县| 瑞昌市| 北辰区| 古浪县| 紫云| 勃利县| 盐城市| 钟山县| 隆化县| 宜州市| 贺兰县| 毕节市| 乳山市| 开平市| 镇坪县| 延长县|