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

Ended

Participants:138

Verdict:Wrong Answer
Score:0 / 100
Submitted:2016-07-27 16:32:54

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 <map>
#include <string>
#include <iostream>
using namespace std;
struct product{
    string id;
    double prices;
    
    bool operator <(const product other)const{
        if(id<other.id || (id == other.id && prices < other.prices))
            return true;
        return false;
    }
};
int main(){
    int n;
    while(cin>>n){
        map<product,int> productMap;
        for(int i=0;i<n;i++){
            int m;
            cin>>m;
            for(int j=0;j<m;j++){
                product temp;
                string date;
                cin>>temp.id>>date>>temp.prices;
                productMap[temp]++;
            }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX