Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <string>
- #include <cstring>
- using namespace std;
- int main() {
- char n,prev;
- int dan=0,p=0;
- cin>>prev;
- p=1;
- while(cin>>n){
- if (prev==n)
- p++;
- else
- p=1;
- if (p==7){
- dan=1;
- break;
- }
- prev=n;
- }
- if (dan)
- cout<<"YES"<<endl;
- else
- cout<<"NO"<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement