-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA.cpp
More file actions
70 lines (57 loc) · 1.27 KB
/
Copy pathA.cpp
File metadata and controls
70 lines (57 loc) · 1.27 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <bitset>
#include <string>
using namespace std;
#define ll long long int
#define ull unsigned long long int
#define uc unsigned char
#define ii pair<int, int>
#define llll pair<ll, ll>
#define vc vector
#define vi vc<int>
#define vll vc<ll>
#define vuc vc<unsigned int>
#define vvi vc<vi>
#define vvll vc<vll>
#define vvuc vc<vuc>
#define print cout <<
#define el endl
#define in cin >>
#define fast cin.tie(0); cout.tie(0); ios::sync_with_stdio(0);
#define gcd __gcd
#define lcm __lcm
#define pc __builtin__popcount
#define ext return 0;
/******************************* CODE HERE *******************************/
int main()
{
fast
int t;
in t;
int size;
int j;
string a, b, c;
for (int i = 0; i < t; ++i)
{
cin >> a >> b >> c;
size = a.length();
for (j = 0; j < size && (a[j] == c[j]) || (b[j] == c[j]); ++j);
if (j < size)
{
cout << "NO" << el;
}
else
{
cout << "YES" << el;
}
}
ext
}