hihoCoder太阁最新面经算法竞赛10 register

Ended

Participants:138

Verdict:Wrong Answer
Score:0 / 100
Submitted:2016-07-25 17:51:17

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
//
//  10-PupularProducts.cpp
//  TestProj
//
//  Created by  on 16/7/25.
//  Copyright © 2016 . All rights reserved.
//
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <map>
using namespace std;
struct node{
    string id;
    double price;
    node(){}
    node(int i,double p){id = i;price = p;}
    bool operator <(const struct node &A) const
    {
        if(A.id!=id){return id < A.id;}
        else{
            return price < A.price;
        }
    }
};
string id,date;
double price;
int N,len;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX