文章
166
粉丝
68
获赞
1000
访问
141.3k
 
#include <bits/stdc++.h>
using namespace std;
struct medals {
    int golds, all_medals, people;
    medals(int golds, int all_medals, int people) : golds(golds), all_medals(all_medals), people(people) {};
    bool operator==(medals b) {
        return golds == b.golds && all_medals == b.all_medals && people == b.people;
    }
};
bool compare_by_golds(const medals& a, const medals& b) {
    return a.golds > b.golds;
}
bool compare_by_all_medals(const medals& a, const medals& b) {
    return a.all_medals > b.all_medals;
}
bool compare_by_pergolds(const medals& a, const medals& b) {
    return (double)a.golds / a.people > (double)b.golds / b.people;
}
bool compare_by_permedals(const medals& a, const medals& b) {
    return (double)a.all_medals / a.people > (double)b.all_medals / b.people;
}
int main() {
    int n, m;
    while (cin >> n >> m) {
        vector<medals&g...
    
登录后发布评论
暂无评论,来抢沙发