najimCseJu

2013 December Contest, Bronze Problem 1. Record Keeping

Oct 17th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define Mx 101
  4. map<string,int>m;
  5.  
  6. int main()
  7. {
  8.     ios_base::sync_with_stdio(false);
  9.     cin.tie(NULL);
  10.     //freopen("records.in","r",stdin);
  11.     //freopen("records.out","w",stdout);
  12.     vector<string>V(3);
  13.     int n;
  14.     cin >> n;
  15.     string str;
  16.     for(int i=0;i<n;i++)
  17.     {
  18.         cin >> V[0] >> V[1] >> V[2];
  19.         sort(V.begin(),V.end());
  20.         str= V[0]+V[1]+V[2];
  21.         m[str]++;
  22.     }
  23.     int mx = 0;
  24.     for(auto x : m)
  25.     {
  26.          mx = max(mx,x.second);
  27.     }
  28.     cout << mx << endl;
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment