- 25CSP-J模拟十连测(三)
50分求调
- 2025-8-25 16:20:44 @
#include<bits/stdc++.h>
#define int long long
#define double long double
#define INF 2147483647
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define endl '\n'
#define gcd(a,b) __gcd(a,b)
#define cfast(); ios::sync_with_stdio(0);cin.tie(0);
#define whfor(n) for(int i=0;i<n;i++)
#define ain(a,b,c) for(int i=a;i<b;i++){cin>>c[i];}
#define n 5
using namespace std;
signed main(){
//TODO
int t;
cin>>t;
for(int i=0;i<t;i++){
int a[6]={},b[6]={};
for(int i=0;i<5;i++){
cin>>a[i];
}
for(int i=0;i<5;i++){
cin>>b[i];
}
for(int i=0;i<n-1;i++){
for(int j=0;j<n;j++){
if(j==i)continue;
if(a[i]==b[j]){
cout<<"YES\n";
goto theend;
}
}
}
cout<<"NO\n";
theend:;
}
return 0;
}
/*
---INFORMATIONS---
TIME:2025-05-31 09:55:45
*/
0 条评论
目前还没有评论...