Lang:G++
Edit12345678910111213141516171819202122232425262728293031#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]++;}