-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1650A.cpp
More file actions
35 lines (29 loc) · 719 Bytes
/
Copy path1650A.cpp
File metadata and controls
35 lines (29 loc) · 719 Bytes
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
26
27
28
29
30
31
32
33
34
35
// Created on 12-Nov-24
//
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define getunique(v) {sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end());}
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL)
int main() {
faster;
int t;
cin >> t;
while (t--) {
string s;
char c;
cin >> s >> c;
int flag = false;
for (int i = 0; i < s.size(); i++) {
if (s[i] == c && (i % 2 == 0)) {
flag = true;
break;
}
}
if (flag) cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}