Skip to content

Commit a740e17

Browse files
committed
Added 1791A - Codeforces Checking.cpp
1 parent d922f10 commit a740e17

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

1791A - Codeforces Checking.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
4+
// Code Written By: Vikash Patel
5+
6+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
7+
8+
bool check(char c)
9+
{
10+
string s ="codeforces";
11+
for(auto i : s)
12+
{
13+
if(i==c)
14+
return true;
15+
}
16+
return false;
17+
}
18+
int main()
19+
{
20+
int t;
21+
cin>>t;
22+
while(t--)
23+
{
24+
char c;
25+
cin>>c;
26+
if(check(c))
27+
cout<<"YES"<<endl;
28+
else
29+
cout<<"NO"<<endl;
30+
}
31+
}

0 commit comments

Comments
 (0)