Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: HawThorns
Problemset: ตัวอักษรตัวแรกในคำ
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-12 19:51:07
#include <iostream>
#include <set>
#include <algorithm>
#include <map>
using namespace std;
int main(){
string temp;
map<char,int> stuff ;
getline(cin, temp);
for(const auto &ch: temp){
if(stuff.find(ch) != stuff.end()){
stuff[ch]++;
}
else
{
stuff.insert( {ch,0} );
}
}
//sort(stuff.begin(),stuff.end());
for(const auto &par : stuff){
//cout << "{"<< par.first<<"," <<par.second <<"}" << endl;
if(par.second == 0){
cout << par.first;
break;
}
}
return 0;
}