fork download
  1. #include<bits/stdc++.h>
  2. #define int long long
  3. using namespace std;
  4. int32_t main()
  5. {
  6. int t=1;
  7. // cin>>t;
  8. while(t--)
  9. {
  10. string s;
  11. cin>>s;
  12. int x=s.size();
  13. for(int i=0;i<x-6;i++)
  14. {
  15. int cn=0;
  16. for(int j=0;j<7;j++)
  17. {
  18. if(s[i]==s[i+j])
  19. cn++;
  20. if(cn==7)
  21. {
  22. cout<<"YES";
  23. return 0;
  24. }
  25. }
  26. }
  27. cout<<"NO";
  28. }
  29. return 0;
  30. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
NO