1083 List Grades】的更多相关文章

1083 List Grades (25 分) Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval. I…
1083 List Grades (25 分) Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval. I…
the problem is from PAT,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1083 and the source code is as followed. /* firstly: sort the array using the algorithm "sort" secondly: traverse all the possible answer and find the most su…
https://pintia.cn/problem-sets/994805342720868352/problems/994805383929905152 Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student…
#include <cstdio> #include <cstdlib> using namespace std; class Stu { public: ]; ]; }; int main() { ; // because all the grades are distinct & grade in range of [0, 100] // use simplified bucket sort here Stu* stu[] = {}; int grade; scanf(…
Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval. Input Specification: Each…
Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval. Input Specification: Each…
简单排序. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #include<map> #include<stack> #include<queue> #include<string> #include<iostream> #include<algorithm> using namespace std…
给定区间[L,R],给出在这区间之内的学生,并且按照他们的成绩非升序的顺序输出. #include <iostream> #include <cstdio> #include <string.h> #include <algorithm> using namespace std; ; struct Stu{ ]; ]; int grade; bool operator<(const Stu tmp)const{ return grade>tmp.…
题意: 输入一个正整数N(<=101),接着输入N个学生的姓名,id和成绩.接着输入两个正整数X,Y(0<=X,Y<=100),逆序输出成绩在x,y之间的学生的姓名和id. trick: 测试点3格式错误因为输出的所有学生姓名和id后面都要换行,大概如果PAT没说不要输出多余的换行的话,就全都加个换行,说了就不加.....…