mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 18:14:22 +00:00
36 lines
476 B
C++
36 lines
476 B
C++
#include <iostream>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
bool check(string s, string t)
|
|
{
|
|
if (s.length() != t.length())
|
|
{
|
|
return 0;
|
|
}
|
|
for (int i = 0; i < s.length(); i++)
|
|
{
|
|
if (s[i] != t[t.length() - 1 -i])
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
string s, t;
|
|
cin >> s >> t;
|
|
if (check(s, t))
|
|
{
|
|
cout << "YES";
|
|
}
|
|
else
|
|
{
|
|
cout << "NO";
|
|
}
|
|
return 0;
|
|
}
|