Advertisement
momo2345

Indian summer

Jul 26th, 2020
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define op ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
  4. #define endl "\n"
  5. int main()
  6. {
  7.        int n;
  8.        cin>>n;
  9.      /*  int c=1;
  10.        pair<string,string>p[15];
  11.        for(int i=0;i<n;i++){
  12.            //string s,t;
  13.            //cin>>s>>t;
  14.            
  15.            cin>>p[i].first>>p[i].second;
  16.          }
  17.        sort(p,p+n);
  18.         for(int i=1;i<n;i++){
  19.            if(p[i-1]!=p[i]) c++;
  20. }
  21.        cout<<c<<endl;*/
  22.       vector<pair<string,string> > v(n);
  23.       for(int i=0;i<n;i++) cin>>v[i].first>>v[i].second;
  24.       sort(v.begin(),v.end());
  25.       int c=unique(v.begin(),v.end())-v.begin();
  26.       cout<<c<<endl;
  27.      
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement