fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main() {
  6. string s;
  7. cin >> s;
  8. for(int j = 0; j < s.size(); j++) {
  9. int i = j + 1;
  10. while (i < s.size()) {
  11. if(s[j] == s[i] and i != j) s.erase(i,1);
  12. else i++;
  13. }
  14. }
  15. cout << s.size();
  16. return 0;
  17. }
Success #stdin #stdout 0s 4400KB
stdin
Standard input is empty
stdout
Standard output is empty