得0蛋了。
查看原帖
得0蛋了。
1566146
Battle_Man楼主2025/7/28 15:39

是我题意理解错误了?感觉不用STL也能过,直接零蛋了

#include<bits/stdc++.h>
using namespace std;

const int N = 1e5 + 100;
int q;
int p[N],po[N];
int n;

int main(){
	cin >> q;
	bool t;
	while(q--){
		cin >> n;
		for(int i = 1 ; i <= n ; i++)cin >> p[i];
		
		for(int i = 1 ; i <= n ; i++){
			cin >> po[i];
			if(po[i] != p[n + 1 - i])t = 1,break;
		}
		if(t)cout << "No" << endl;
		else cout << "Yes" << endl;
	}	
	
	return 0;
}
2025/7/28 15:39
加载中...