0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-22 07:31:57 +00:00
OI-codes/AcWing/772/772.cpp

24 lines
387 B
C++
Raw Normal View History

#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;
}