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
Why C++ optimizer has problems with these temporary variables
СПКИ АП КЭП 3
infix to postfix v 6.0 - (exponent support + multiple digits)
Kalkulator z bajerami
Tower of hanoi
base and derr con
Vec+Mem+Adv_11
CutRod(BottomUp)
PalindromeDay
Cross Multiplication