fork download
  1. #include <iostream>
  2. #include <set>
  3. using namespace std;
  4.  
  5. int main() {
  6. string word = "слово";
  7. set<char> s;
  8.  
  9. for (int i = 0; i < word.size(); i++) {
  10. s.insert(word[i]);
  11. }
  12.  
  13. if (s.size() == word.size())
  14. cout << "БЕЗ повторiв" << endl;
  15. else
  16. cout << "Є повтори" << endl;
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
Є повтори