【題解】AtCoder ABC 164C – gacha

【題目敘述】https://atcoder.jp/contests/abc164/tasks/abc164_c

#include <iostream>
#include <set>
using namespace std;

int n;
string s;
set <string> st;

int main() {
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> s;
        st.insert(s);
    }
    cout << st.size() << "\n";
}

分享本文 Share with friends