Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <bits/stdc++.h>
- using namespace std ;
- typedef long long ll ;
- void ABDEL3AL () {
- ios_base::sync_with_stdio(false) , cin.tie(nullptr) , cout.tie(nullptr) ;
- #ifndef ONLINE_JUDGE
- freopen("input.txt" , "r" ,stdin) , freopen("output.txt" , "w" , stdout) ;
- #endif
- }
- void is_wonderful (string s) {
- string t = s ;
- reverse(s.begin() , s.end()) ;
- if (s[0] == '0') cout << "YES" ;
- else if (s[s.size() - 1] % 2 && t == s) cout << "YES" ;
- else cout << "NO" ;
- }
- int main() {
- ABDEL3AL() ;
- string s ;
- cin >> s ;
- is_wonderful (s) ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment