超级简单的博弈
http://codeforces.com/contest/1270
Good Bye 2019 A
#include <stdio.h>
#include <math.h>
#include <string.h>
int max(int a, int b)
{
if(a >= b)
{
return a;
}
else
return b;
}
void solve() {
int n, m;
scanf("%d", &n);
scanf("%d%d", &n, &m);
int x;
int a = 0, b = 0;
while(n--) {
scanf("%d", &x);
a = max(a, x);
}
while(m--) {
scanf("%d", &x);
b = max(b, x);
}
if (a < b)
printf("NO\n");
else
printf("YES\n");
}
int main()
{
int t;
scanf("%d",&t);
while(t--)
solve();
return 0;
}