#include <iostream> using namespace std; #include<vector> #include<algorithm> typedef pair<char, int>pci; int main() { string s; cin >> s; vector<pci>q; int count[110] = { 0 }; for (int i = 0; i < s.size(); i++) { q.push_back({ s[i],i }...