fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. #define int long long
  5. #define yes cout << "YES\n";
  6. #define no cout << "NO\n";
  7.  
  8.  
  9. void FastIO(){
  10. ios_base::sync_with_stdio(false);
  11. cin.tie(nullptr);
  12. cout.tie(nullptr);
  13. }
  14. ///
  15. void solve(){
  16. string str;
  17. cin >> str;
  18.  
  19. for(char& c : str){
  20. c = tolower(c);
  21. }
  22.  
  23. if(str == "yes"){
  24. yes;
  25. }
  26. else{
  27. no;
  28. }
  29. }
  30.  
  31. signed main(){
  32. FastIO();
  33.  
  34. int t = 1;
  35. cin >> t;
  36.  
  37. while(t--){
  38. solve();
  39. }
  40. return 0;
  41. }
Success #stdin #stdout 0s 5324KB
stdin
10
YES
yES
yes
Yes
YeS
Noo
orZ
yEz
Yas
XES
stdout
YES
YES
YES
YES
YES
NO
NO
NO
NO
NO