1 条题解

  • 2

    思路

    只需要求出有多少不重复的数量,再用 5252 去减。因为要去重,所以可以用 std::set<string>

    code

    #include<bits/stdc++.h>
    using namespace std;
    set<string> s;
    string str;
    int main(){
    int n;
    cin>>n;
    while(n--){
    cin>>str;
    s.insert(str);
    }
    cout<<52-s.size();
    return 0;
    }
    
    • 1

    信息

    ID
    572
    时间
    1000ms
    内存
    256MiB
    难度
    10
    标签
    (无)
    递交数
    7
    已通过
    4
    上传者