fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <set>
  4. #include <ctime>
  5. #include <string.h>
  6. using namespace std;
  7.  
  8. int main() {
  9. set<char>::iterator iter;
  10. char m[100];
  11. cin>>m;
  12. int n = strlen(m);
  13. set<char> s;
  14. for(int i=0; i<n; i++){
  15. s.insert(m[i]);
  16. }
  17. if(s.size()==n){
  18. cout<<"Не повторюються";
  19.  
  20. }
  21. else{
  22. cout<<"Повторюються";
  23. }
  24.  
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0.01s 5324KB
stdin
Dog
stdout
Не повторюються