0分求助
查看原帖
0分求助
1014288
lixinran2012楼主2024/4/21 14:51
#include<bits/stdc++.h>
using namespace std;
long long a[100005],c,d,e;
bool f[100005]={true};
int main(){
	cin>>c;
	for(long long i=1;i<=c;i++){
		cin>>d;
		for(int j=1;j<=d;j++){
			cin>>a[j];
		}
		for(long long j=d;j>=1;j--){
			cin>>e;
			if(e!=a[j]&&f[i]!=true){
				f[i]=false;
			}else f[i]=true;
		}
	}
	for(int i=1;i<=c;i++){
		if(f[i]==false){
			cout<<"No"<<endl;
		}else cout<<"Yes"<<endl;
	}
	return 0;
}

总感觉有亿点奇怪··· ···

2024/4/21 14:51
加载中...