Advertisement
Rofyda_Elghadban1

Untitled

Aug 13th, 2022
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstdlib>
  6. #include <limits.h>
  7. #include <string>
  8.  
  9. #define ll long long
  10.  
  11. using namespace std;
  12. void Fast_IO();
  13. void Rofyda_Elghadban(){
  14. #ifndef ONLINE_JUDGE
  15. freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  16. #endif
  17. }
  18. int main()
  19. { Rofyda_Elghadban();
  20. //Fast_IO();
  21. //freopen("input.txt","r",stdin);
  22. //freopen("output.txt","r",stdout);
  23. int t;
  24. cin>>t;
  25. string s;
  26. while(t--){
  27. cin>>s;
  28. int flag=0;
  29. for(int i=0;i<s.size();i++){
  30. if((s[i]=='y'||s[i]=='Y')&&(s[i+1]=='e'||s[i+1]=='E')&&(s[i+2]=='s'||s[i+2]=='S')){
  31. flag=1;
  32. }else{
  33. flag=0;
  34. }
  35. }if(flag==1){
  36. cout<<"YES"<<endl;
  37. }else if(flag==0){
  38. cout<<"NO"<<endl;
  39. }
  40. }
  41.  
  42.  
  43.  
  44.  
  45. return 0;
  46. }
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement