文章
10
粉丝
578
获赞
16
访问
110.0k
#include <bits/stdc++.h>
using namespace std;
struct node {
double goldNum, medalNum, population;
int countryID;
int rank = 99999;
int randStyle = 99999;
};
int cmp1(node n1, node n2) {
return n1.goldNum > n2.goldNum;
}
int cmp2(node n1, node n2) {
return n1.medalNum > n2.medalNum;
}
int cmp3(node n1, node n2) {
return n1.goldNum / n1.population > n2.goldNum / n2.population;
}
int cmp4(node n1, node n2) {
return n1.medalNum / n1.population > n2.medalNum / n2.population;
}
int main() {
// freopen("1.txt", "r", stdin);
int n;
while(cin >> n) {
int m;
cin >> m;
vector<node> ans1;
vector<node> ans2;
vector<node> ans3;
vector<node> ans4;
//存储数据
for(int i = 0; i < n; i++) {
node p;
cin >> p.goldNum >> p.medalNum >> p.population;
p....
登录后发布评论
暂无评论,来抢沙发