文章

8

粉丝

0

获赞

9

访问

2.4k

头像
考试招生 题解:
P5252 浙江大学2024年机试题
发布于2025年8月3日 10:45
阅读数 43

//特判错误数据

#include<string.h>
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

struct Student{
    int ac, num, total;
    int s[5];
}st[1005];

vector<int> ret[105];
int n, m;
int k, c;

bool cmp(Student a, Student b){
    if(a.ac != b.ac) return a.ac < b.ac;
    if(a.total == b.total){
        if(a.s[c] != b.s[c]){
            return a.s[c] > b.s[c];
        }else return a.num < b.num;
    } 
    return a.total > b.total;
}
 
bool equal(Student a, Student b){
    return a.total == b.total && a.s[c] == b.s[c];
}
int main()
{
    cin >> n >> m;
    for(int i = 0; i < n; i++){
        ...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发