Easystringstwo-pointers
Palindrome Check
Time limit 2 s · Memory 64 MB
Statement
You are given a string of lowercase Latin letters. Print YES if it is a palindrome (reads the same forwards and backwards), otherwise NO.
Constraints
String length is between 1 and 10^5
Examples
Input 1
racecar
Output 1
YES
Input 2
hello
Output 2
NO