文章

14

粉丝

0

获赞

3

访问

976

头像
成绩排序 - 西电 题解:sort()方法可以解决所有的排序
P1733 西安电子科技大学机试题
发布于2025年8月16日 12:43
阅读数 85

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <set>
#include <list>
#include <string>
#include <cmath>
#include <stack>
#include <map>
#include <sstream>
#include <queue>
using namespace std;

struct tt {
    string s;
    int cj;
};

bool com(tt a, tt b) {
    if (a.cj == b.cj) {
        stringstream ssa(a.s);
        stringstream ssb(b.s);


        string ayear; string amonth; string adate;
        getline(ssa, ayear, '/'); getline(ssa, amonth, '/'); getline(ssa, adate, '/');
        string byear; string bmonth; string bdate;
        getline(ssb, byear, '/'); getline(ssb, bmonth, '/...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发