哪里错了?为何不过?
查看原帖
哪里错了?为何不过?
1545016
helloworldhahaha楼主2024/11/19 21:58
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main(){
	int n;cin>>n;
	for(int i=0;i<n;i++){
		int x;cin>>x;cin.ignore(1);
		string s1,s2;
		getline(cin,s1);
		getline(cin,s2);
		reverse(s1.begin(),s1.end());
		if(s1==s2) cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
	return 0;
}
2024/11/19 21:58
加载中...