1536.How many users on SDNU OJ
题目见下图
可以用map

#include <cstdio>
#include <iostream>
#include <map>
#include <cstring>
using namespace std;
int main()
{
   
    int t,n,i,j,m;
    string s;
    map<string,int>mp;
    map<string,int>::iterator b;
    scanf("%d",&t);
    for(i=1;i<=t;i++)
    {
   
        scanf("%d",&n);
        m=n;
        getchar();
        for(j=0;j<n;j++)
        {
   
            getline(cin,s);
            mp[s]++;
        }
        for(b=mp.begin();b!=mp.end();b++)
        {
   
            if(b->second>1)
                m=m-b->second+1;
        }
        cout<<"Case #"<<i<<": "<<m<<'\n';
        mp.clear();
    }
    return 0;
}