Advertisement
jakaria_hossain

codeforce - translation

Apr 3rd, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define fastread()(ios_base::sync_with_stdio(false),cin.tie(NULL));
  4. int main()
  5. {
  6. fastread()
  7. string x,y;
  8. cin>>x>>y;
  9. int a=x.size(),b=y.size();
  10. bool flag= true;
  11. if(a==b)
  12. {
  13. for(int i=0,j=a-1;i<a,j>=0;i++,j--)
  14. {
  15. if(x[i]!=y[j])
  16. {
  17. flag= false;
  18. break;
  19. }
  20. }
  21. if(flag)cout<<"YES"<<endl;
  22. else cout<<"NO"<<endl;
  23. }
  24. else cout<<"NO"<<endl;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement