-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path96A_Football.cpp
More file actions
62 lines (62 loc) · 1.06 KB
/
Copy path96A_Football.cpp
File metadata and controls
62 lines (62 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Winners never Quit!
#include <bits/stdc++.h> // Problem - 96A
using namespace std;
#define ll long long
#define pr pair<ll, ll>
#define pb push_back
#define fr(i, a, n) for (ll i = a; i < n; i++)
#define frr(i, a, n) for (ll i = n - 1; i >= a; i--)
#define elif else if
bool isprime(ll n)
{
if (n < 2) return false;
for (ll i = 2; i * i <= n; i++)
if (n % i == 0) return false;
return true;
}
ll pow(ll a, ll b) // O(log(b))
{
ll res = 1;
while (b)
{
if (b & 1) res *= a;
a *= a;
b >>= 1;
}
return res;
}
void solve()
{
string s; cin>>s;
ll cnt1=0,cnt2=0;
fr(i,0,s.size()){
if(s[i]=='1'){
cnt1++;
cnt2=0;
}
else {
cnt1=0;
cnt2++;
}
if(cnt1==7 || cnt2==7){
cout<<"YES\n";
return;
}
}
cout<<"NO\n";
return;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
// ll T; cin >> T;
// while (T--)
solve();
return 0;
}