Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- bool comp(string s){
- for (ll i=0; i<(s.length()+1)/2; i++){
- if (s[i]!=s[s.length()-i-1])
- return false;
- }
- return true;
- }
- int main(){
- string s;
- cin.sync_with_stdio(false);
- cin >> s;
- cout << (comp(s)?"yes":"no") << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement