文章
13
粉丝
120
获赞
1
访问
6.7k
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
int main()
{
string str;
while (cin >> str)
{
map<char, vector<int>> m;
map<int, char> keys;
int index = 0;
for (int i = 0; i < str.length(); i++)
{
m[str[i]].push_back(i);
if (m[str[i]].size() == 1)
keys[index++] = str[i];
}
for (auto i = keys.begin(); i != keys.end(); i++)
{
if (m[i->second].size() > 1)
...
登录后发布评论
暂无评论,来抢沙发