国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

oj.21163

2023-02-17 15:50 作者:下條_  | 我要投稿

#include<bits/stdc++.h>

using namespace std;

struct stu{

int one,two,three;//前三道題的成績(jī)?

string number,name;//學(xué)號(hào),姓名

int sum;//總分?

int m;//輸入順序?

}a[1005];

bool cmp(stu x,stu y){

if(x.sum!=y.sum){//按總分排?

return x.sum>y.sum;

}

if(x.three!=y.three){//按第三題成績(jī)排?

return x.three>y.three;

}

return x.m<y.m;//按輸入順序排?

}

int main(){

int n;

cin>>n;

for(int i=1;i<=n;i++){

cin>>a[i].one>>a[i].two>>a[i].three>>a[i].number>>a[i].name;

a[i].sum=a[i].one+a[i].two+a[i].three;//計(jì)算出每個(gè)人的總分?

a[i].m=i;//保存每個(gè)人的輸入順序?

}

sort(a+1,a+1+n,cmp);

for(int i=1;i<=n;i++){

cout<<a[i].one<<" "<<a[i].two<<" "<<a[i].three<<" "<<a[i].number<<" "<<a[i].name<<endl;

}

return 0;

}


oj.21163的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
达日县| 莱阳市| 海林市| 富民县| 南岸区| 泰和县| 台南县| 北海市| 忻城县| 伽师县| 清新县| 凌源市| 武隆县| 师宗县| 昌宁县| 滕州市| 北川| 石城县| 乌兰察布市| 平潭县| 宜君县| 大石桥市| 贵德县| 报价| 嘉善县| 太和县| 奉新县| 息烽县| 自贡市| 淳化县| 牡丹江市| 道孚县| 延边| 同江市| 甘南县| 普格县| 昌吉市| 岳阳县| 论坛| 日土县| 桂林市|