Backwards - speak

**Problem :**CodeChef: Practical coding for everyone
Difficulty : easy
Topic : String
Explanation :You can use reverse() and check if the strings are equal or not . Another approach is to check manually each character if they are equal print Yes otherwise No.

Code:
#include<bits/stdc++.h>

using namespace std;
int main()
{
string s,t;
cin>>s>>t;
reverse(t.begin(),t.end() );
if(s==t)
{ cout<<“YES”<<endl; }
else
{ cout<<“NO”<<endl; }
return 0;
}