fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main () {
  6.  
  7. int t; cin>> t;
  8.  
  9. while (t--) {
  10.  
  11. string s;
  12. cin >> s;
  13.  
  14. bool diff=false;
  15. for (int i=0; i<s.length(); i++) {
  16.  
  17. if (s[i]!=s[i+1]) {
  18. diff=true;
  19. break;
  20. }
  21. }
  22.  
  23. if (diff)
  24. cout << "Yes" << endl;
  25. else
  26. cout << "No" << endl;
  27.  
  28. }
  29. }
Success #stdin #stdout 0.01s 5320KB
stdin
3
2
00
2
11
2
10
stdout
Yes
Yes
Yes