590
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
struct Student{
int stid,de,cai;
};//定义结构体,成员为考号,德分,才分
bool cmp(Student a,Student b)//设计适应题目的比较函数以调用排序算法
{
if(a.de+a.cai!=b.de+b.cai)
return a.de+a.cai>b.de+b.cai;//降序
else
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
struct Student{
int stid,de,cai;
};//定义结构体,成员为考号,德分,才分
bool cmp(Student a,Student b)//设计适应题目的比较函数以调用排序算法
{
if(a.de+a.cai!=b.de+b.cai)
return a.de+a.cai>b.de+b.cai;//降序
else
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
struct Student{
int stid,de,cai;
};//定义结构体,成员为考号,德分,才分
bool cmp(Student a,Student b)//设计适应题目的比较函数以调用排序算法
{
if(a.de+a.cai!=b.de+b.cai)
return a.de+a.cai>b.de+b.cai;//降序
else
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
struct Student{
int stid,de,cai;
};//定义结构体,成员为考号,德分,才分
bool cmp(Student a,Student b)//设计适应题目的比较函数以调用排序算法
{
if(a.de+a.cai!=b.de+b.cai)
return a.de+a.cai>b.de+b.cai;//降序
else