题目要求:有n个考场,每个考场有若干个考生,现给出各个考场中考生的准考证号与分数,按照分数从高到低排序,并按顺序输出所有考生的准考证号,排名,考场号以及所在的考场排名 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct Student { char id[15]; int score; int location_number; int local_rank;…
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 i…
题目描述 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…
题目意思大概是输入一堆人的学号,成绩,给出学号,总排名,考场号,考场内排名. 这是我第一次写的: #include <iostream> #include <algorithm> using namespace std; const int maxn = 30005; struct Student { int registnum[13]; int score; int rank_in_group; int group; }; Student stu[maxn]; //创建数组用于存…