Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Palindrome
#include <bits/stdc++.h> using namespace std; int main() { string S = ""; string A; vector<string> vec; int i,j; while(cin>>A){ vec.push_back(A); } for(i=0,j=vec.size(); i<vec.size(); i++, j--){ S+=vec[i]; } for(i=0,j=S.size()-1; i<S.size(); i++, j--){ if(S[i]!=S[j]) { break; } } if(i<S.size()) cout<<"NO"; else cout<<"YES"; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Varadic macro
Matrix spiral print
2
offsetof
Arithmetic
ddd
all possible palindrome partitions
e-olymp.com---problem1590---Birthday 2
Fungsi
initializer_list example
Please log in to post a comment.