aboutsummaryrefslogtreecommitdiff
path: root/codechef/StudyingAlphabet/main.cpp
blob: 1eb962299c181290d0bae4d6501c674940f54b97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
  }
}