Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Codeforces Round 96A
- #include <iostream>
- using namespace std;
- int main()
- {
- char n;
- int sum_od=0, sum_nl=0, answ=0;
- while(cin >> n)
- {
- if(n=='1'){sum_od++;sum_nl=0;}
- else{sum_nl++;sum_od=0;}
- if(sum_od==7 || sum_nl==7){answ=1;}
- }
- if(answ==0){cout<<"NO";}
- else{cout<<"YES";}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement