Run Code
|
API
|
Code Wall
|
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
Nth max element in BST
vertical sum
Dar
copy_if c++98
CS 201
iviewb
PriQTel
TempSpecial2
BinTraversal v2
Speed