[Offer收割]编程练习赛25 register

Ended

Participants:399

Verdict:Accepted
Score:100 / 100
Submitted:2017-09-03 12:32:35

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
const int maxn = 100000 + 10;
struct name {
    string fn;
    string sn;
    int num;
}s[maxn];
int n;
bool cmp( name n1, name n2) {
    if (n1.fn < n2.fn) return true;
    if (n1.fn == n2.fn)
        return n1.num < n2.num;
    return false;
}
int get_num(char *tn) {
    vector<int> trans;
    for (int i = 0; tn[i] != '\0'; i++) {
        if (tn[i] == 'I') trans.push_back(1);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX