diff options
Diffstat (limited to 'codechef/StudyingAlphabet/main.cpp')
| -rw-r--r-- | codechef/StudyingAlphabet/main.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/codechef/StudyingAlphabet/main.cpp b/codechef/StudyingAlphabet/main.cpp new file mode 100644 index 0000000..1eb9622 --- /dev/null +++ b/codechef/StudyingAlphabet/main.cpp @@ -0,0 +1,25 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + string s; + cin >> s; + int n; + cin >> n; + while(n--) { + string word; + cin >> word; + bool ok = 1; + for(auto ch : word) { + int found = s.find(ch); + if(found == string::npos) { + ok = 0; + break; + } + } + cout << (ok ? "Yes" : "No") << endl; + } +} |
