[Init] Solved solutions

This commit is contained in:
2023-03-02 20:58:03 +07:00
parent 51f667ac81
commit 20542601dd
131 changed files with 4148 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#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;
}