#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int l1 = s1.length();
int l2 = s2.length();
if(l1 != l2) {
cout << "NO" << endl;
} else {
bool ok = true;
for(int i = 0, j = l2 - 1; i < l1; ++i, --j) {
if(s1[i] != s2[j]) {
ok = false;
break;
}
}
if(ok) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
return 0;
}
41A Translation
最新推荐文章于 2024-05-21 16:39:52 发布