#include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main()
{
string team ;
int i;
int a=0, b=0;
int length;
cin >> team;
length = team.size();
for(i=0; i< length; i++){
if(team[i]== '1'){
a++;
b=0;
}
else if(team[i]== '0'){
b++;
a=0;
}
if(a >= 7 || b >= 7)
break;
}
if(a >= 7 || b >= 7)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
}
I don't understand this problem do you plz explain more.TIA
ReplyDeleteThis is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post. I will visit your blog regularly for Some latest post. บอลออนไลน์UFA800
ReplyDeleteit showing error ,can you tell me in which language you explain?
ReplyDelete