Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int i, j, x, dolz, l, temp;
- string str;
- cin >> dolz >> str;
- for(i=0; i<dolz; i++)
- {
- temp = 1;
- if(str[i]-'0' == 2 or str[i]=='?')
- for(j=0, l=i+1; j<1 and l<dolz; j++, l++)
- if(str[l]-'0'==2 or str[l]=='?')temp++;
- if(temp == 2){ cout << "cool"; return 0; }
- temp = 1;
- if(str[i]-'0' == 3 or str[i]=='?')
- for(j=0, l=i+1; j<2 and l<dolz; j++, l++)
- if(str[l]-'0'==3 or str[l]=='?')temp++;
- if(temp == 3){ cout << "cool"; return 0; }
- temp = 1;
- if(str[i]-'0' == 5 or str[i]=='?')
- for(j=0, l=i+1; j<4 and l<dolz; j++, l++)
- if(str[l]-'0'==5 or str[l]=='?')temp++;
- if(temp == 5){ cout << "cool"; return 0; }
- temp = 1;
- if(str[i]-'0' == 7 or str[i]=='?')
- for(j=0, l=i+1; j<6 and l<dolz; j++, l++)
- if(str[l]-'0'==7 or str[l]=='?')temp++;
- if(temp == 7){ cout << "cool"; return 0; }
- }
- cout << "boring";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement