Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- //#include "..\Stack.h"
- using namespace std;
- int main()
- {
- int n;cin>>n;
- string a;cin>>a;
- string a2=a,a3=a,a5=a,a7=a;
- bool coolnes=false;
- for(int i=0;i<n;i++)
- {
- if(a[i]=='?')
- {
- a2[i]='2';
- a3[i]='3';
- a7[i]='7';
- a5[i]='5';
- }
- }
- int sed=0,pet=0,tri=0;
- for(int i=0;i<n;i++)
- {
- if((i>0&&a2[i]=='2'&&a2[i-1]=='2')||(i<n-1&&a2[i]=='2'&&a2[i+1]=='2')){cout<<"cool"; return 0;}
- if(a7[i]=='7')
- {
- sed++;
- }
- else sed=0;
- if(a5[i]=='5')
- {
- pet++;
- }
- else pet=0;
- if(a3[i]=='3')
- {
- tri++;
- }
- else tri=0;
- if(tri>=3||sed>=7||pet>=5){
- cout<<"cool";return 0;}
- }
- cout<<"boring";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement