0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-11 23:06:27 +00:00
OI-codes/AcWing/772/772.cpp

24 lines
387 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
map<char, int> m;
queue<char> q;
cin >> s;
for (char i : s) {
m[i]++;
q.push(i);
}
while (!q.empty()) {
if (m[q.front()] == 1) {
cout << q.front() << endl;
exit(0);
}
q.pop();
}
cout << "no" << endl;
return 0;
}