Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: goine
Problemset: ตัวอักษรตัวแรกในคำ
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-12 11:58:22
#include<iostream>
#include<set>
using namespace std;
int main() {
string x;
cin >> x;
char first = 'Z' + 1;
set<char> d;
for (char c : x) {
if (d.find(c) == d.end()) d.emplace(c);
else d.erase(c);
}
for (char c : d) {
if (c < first) first = c;
}
if (first != 'Z' + 1)
cout << first;
return 0;
}