#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(NULL);
string s;
cin >> s;
int temp = 1;
int ans;
for(int i = 1; i < s.size(); i++){
if(s[i] == s[i-1]){
temp += 1;
cout << temp << " ";
}
else;
ans = max(ans, temp);
temp = 1;
}
if(ans >= 7){
cout << "YES";
}
else{
cout << "NO";
}
return 0;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter