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

Ended

Participants:102

Verdict:Accepted
Score:100 / 100
Submitted:2018-10-21 13:15:07

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 <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct record{
    int id;
    int hh,mm,ss,time;
    record(int _id,int _hh,int _mm,int _ss){
        id=_id;
        time=_hh*3600+_mm*60+_ss;
    }
};
bool comp(record a,record b){
    if(a.id!=b.id) return a.id<b.id;
    return a.time<b.time;
}
int main(){
    int N;
    cin>>N;
    vector<record> v;
    map<int,vector<int> > m;
    for(int i=0;i<N;i++){
        int A,hh,mm,ss,time;
        scanf("%d %d:%d:%d",&A,&hh,&mm,&ss);
        time=hh*3600+mm*60+ss;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX