PAT 1141 PAT Ranking of Institutions】的更多相关文章

After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specification:Each input file contains one test case. For each case, the first line give…
After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specification: Each input file contains one test case. For each case, the first line giv…
1141 PAT Ranking of Institutions (25 分) After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specification: Each input file contains one test…
https://pintia.cn/problem-sets/994805342720868352/problems/994805344222429184 After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specificat…
After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specification: Each input file contains one test case. For each case, the first line giv…
After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specification: Each input file contains one test case. For each case, the first line giv…
After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specification: Each input file contains one test case. For each case, the first line giv…
Source: PAT A1141 PAT Ranking of Institutions (25 分) Description: After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist. Input Specification: Each in…
题目:https://pintia.cn/problem-sets/994805342720868352/problems/994805344222429184 题意: 给定几个学生的PAT分数和学校,给这些学校学生的PAT总分排序. 思路: 库函数tolower()和toupper()可以分别把字符串转换为都是小写字母和都是大写字母. 这道题要注意的是,因为是加权的总分,算的时候应该用double.但是题目中有说,总分取加权之后的整数部分,全部加完后要转成int进行比较. //#include…
题意:给出考生id(分为乙级.甲级和顶级),取得的分数和所属学校.计算各个学校的所有考生的带权总成绩,以及各个学校的考生人数.最后对学校进行排名. 思路:本题的研究对象是学校,而不是考生!因此,建立学校的结构体Record,记录学校的校名,考生人数,排名,成绩等信息.利用map<校名,该学校对应的结构体>构造映射,然后在读入数据的时候就可以更新该学校的分数,学生人数.数据读入完毕后,根据计算规则求出各个学校的带权总成绩,再把结构体放到vector中排序一下,确定排名,就好了. 代码: #inc…