Advertisement
Saleh127

Untitled

May 5th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int b,i,j,k,l;
  6. string a,c,d;
  7. cin>>b;
  8. for(i=0;i<b;i++)
  9. {
  10. cin>>a;
  11. c+=a;
  12. }
  13. d=c;
  14. reverse(d.begin(),d.end());
  15. if(d!=c)
  16. cout<<"NO\n";
  17. else
  18. cout<<"YES\n";
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement