Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- #include <algorithm>
- #include <cstdlib>
- #include <limits.h>
- #include <string>
- #define ll long long
- using namespace std;
- void Fast_IO();
- void Rofyda_Elghadban(){
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- { Rofyda_Elghadban();
- //Fast_IO();
- //freopen("input.txt","r",stdin);
- //freopen("output.txt","r",stdout);
- int t;
- cin>>t;
- string s;
- while(t--){
- cin>>s;
- int flag=0;
- for(int i=0;i<s.size();i++){
- if((s[i]=='y'||s[i]=='Y')&&(s[i+1]=='e'||s[i+1]=='E')&&(s[i+2]=='s'||s[i+2]=='S')){
- flag=1;
- }else{
- flag=0;
- }
- }if(flag==1){
- cout<<"YES"<<endl;
- }else if(flag==0){
- cout<<"NO"<<endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement