Changed the folder structure of codeforces problemsets
This commit is contained in:
39
codeforces/problemsets/football/football.cpp
Normal file
39
codeforces/problemsets/football/football.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
int main(){
|
||||
ios::sync_with_stdio(0);
|
||||
cin.tie(0);
|
||||
|
||||
string s;
|
||||
getline(cin, s);
|
||||
int n = 0, m = 0;
|
||||
|
||||
bool no = true;
|
||||
|
||||
for(auto c : s){
|
||||
if(c == '0'){
|
||||
n++;
|
||||
m = 0;
|
||||
} else{
|
||||
m++;
|
||||
n = 0;
|
||||
}
|
||||
|
||||
if(abs(n - m) > 6){
|
||||
cout << "YES";
|
||||
no = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(no){
|
||||
cout << "NO";
|
||||
}
|
||||
|
||||
cout << flush;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user