-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathTRUEDARE.cpp
More file actions
48 lines (44 loc) · 878 Bytes
/
TRUEDARE.cpp
File metadata and controls
48 lines (44 loc) · 878 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
36
37
38
39
40
41
42
43
44
45
46
47
48
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int i,t1,t2,t3,t4,a;
cin>>t1;
int hash1[100000]={0};
for(i=0;i<t1;i++)
{
cin>>a;
hash1[a]++;
}
cin>>t2;
int hash2[100000]={0};
for(i=0;i<t2;i++)
{
cin>>a;
hash2[a]++;
}
cin>>t3;
int flag1=0,flag2=0;
for(i=0;i<t3;i++)
{
cin>>a;
if(hash1[a]==0)
flag1++;
}
cin>>t4;
for(i=0;i<t4;i++)
{
cin>>a;
if(hash2[a]==0)
flag2++;
}
if((flag1+flag2)==0)
cout<<"yes"<<"\n";
else
cout<<"no"<<"\n";
}
}