提交时间:2023-09-11 15:20:28

运行 ID: 101959

#include <iostream> #include <algorithm> using namespace std; typedef long long LL; string s[105]; int n; int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> s[i]; sort(s + 1, s + n + 1); for (int i = 1; i <= n; i++) if (s[i] != s[i - 1]) cout << s[i] << endl; return 0; }