Advertisement
rengetsu

Codeforces_96A

Jul 19th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. //Codeforces Round 96A
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     char n;
  7.     int sum_od=0, sum_nl=0, answ=0;
  8.     while(cin >> n)
  9.     {
  10.         if(n=='1'){sum_od++;sum_nl=0;}
  11.         else{sum_nl++;sum_od=0;}
  12.         if(sum_od==7 || sum_nl==7){answ=1;}
  13.     }
  14.     if(answ==0){cout<<"NO";}
  15.     else{cout<<"YES";}
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement