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

Ended

Participants:430

Verdict:Wrong Answer
Score:10 / 100
Submitted:2017-08-20 13:27:10

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
#include <stdio.h>
#include <string.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
struct P {
    string path;
    int idx;
};
bool compare1(const P &lhs, const P &rhs) {
    return lhs.path < rhs.path;
}
bool compare2(const P &lhs, const P &rhs) {
    return lhs.idx < rhs.idx;
}
char s[500050];
int main() {
    int N;
    while(scanf("%d", &N) != EOF) {
        vector<P> v(N);
        for (int i = 0; i < v.size(); i++) {
            scanf("%s", s);
            v[i].path = s;
            v[i].idx = i;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX