12 条题解

  • 1
    @ 2023-8-8 11:00:37

    STL轻松水过

    #include<bits/stdc++.h>
    using namespace std;
    int n; 
    unordered_map<string,bool> mp;
    int cnt=0;
    string s;
    int main()
    {
    	ios::sync_with_stdio(false);
    	cin.tie(0);
    	cin>>n;
    	while(n--)
    	{
    		cin>>s;
    		if(mp[s]==0)
    			cnt++;
    		mp[s]=1;
    	}
    	cout<<cnt;
    	return 0;
    }
    

    信息

    ID
    180
    时间
    300~1000ms
    内存
    1024MiB
    难度
    3
    标签
    递交数
    1888
    已通过
    261
    上传者