Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define fastread()(ios_base::sync_with_stdio(false),cin.tie(NULL));
- int main()
- {
- fastread()
- string x,y;
- cin>>x>>y;
- int a=x.size(),b=y.size();
- bool flag= true;
- if(a==b)
- {
- for(int i=0,j=a-1;i<a,j>=0;i++,j--)
- {
- if(x[i]!=y[j])
- {
- flag= false;
- break;
- }
- }
- if(flag)cout<<"YES"<<endl;
- else cout<<"NO"<<endl;
- }
- else cout<<"NO"<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement