fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while(t--)
  8. {
  9. string s = "codeforces";
  10. int d=0;
  11. char ch;
  12. cin >> ch;
  13. for(int i=0;i<s.size();i++ )
  14. {
  15. if(s[i]==ch)
  16. d++;
  17. }
  18. if(d>0)
  19. {
  20. cout << "YES" << endl;
  21. }
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0s 5320KB
stdin
10
a
b
c
d
e
f
g
h
i
j
stdout
YES
YES
YES
YES