http://codeforces.com/contest/41
A
1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 #define maxn 1000006 5 6 7 int main(){ 8 #ifndef ONLINE_JUDGE 9 // freopen("input.txt","r",stdin); 10 #endif 11 std::ios::sync_with_stdio(false); 12 string s1,s2; 13 cin>>s1>>s2; 14 if(s1.length()==s2.length()){ 15 for(int i=0;i<s1.length();i++){ 16 if(s1[i]!=s2[s1.length()-i-1]){ 17 cout<<"NO"<<endl; 18 return 0; 19 } 20 } 21 cout<<"YES"<<endl; 22 return 0; 23 } 24 cout<<"NO"<<endl; 25 }