Advertisement
karlangadas

96A - Football

Dec 27th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <string>
  4. #include <cstring>
  5. using namespace std;
  6.  
  7. int main() {
  8.     char n,prev;
  9.     int dan=0,p=0;
  10.     cin>>prev;
  11.    
  12.     p=1;
  13.     while(cin>>n){
  14.         if (prev==n)
  15.             p++;
  16.         else
  17.             p=1;
  18.         if (p==7){
  19.             dan=1;
  20.             break;
  21.         }
  22.         prev=n;
  23.     }
  24.     if (dan)
  25.         cout<<"YES"<<endl;
  26.     else
  27.         cout<<"NO"<<endl;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement