CT27983

Envoy Counts the banners

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Envoy found an old ledger of banners in the apiary attic at the fjord village of Deepwater. The margin notes pose a precise question. Task: Print YES if s reads the same forwards and backwards, otherwise NO. Input format: One line with a single lowercase string s. Output format: Print YES or NO. Constraints: 1 <= |s| <= 1691; s contains lowercase English letters.

Example 1:

Input: ppbrajpwgaaztasxivnqxfpaupkhkzmflrtigpaiwxckmbynrayrkvpqjqxshbjwigrncgaiwrfoqzykqfruhybtcuaezzzfbwfhnlutaudixsfbosidakbzcurjetqphskxywjugawftkotycfflrlqvpecvlshtfuzarslwmgjvuajbwepcksfrrayybuhkuzofafaxdmsirjspfwlupyjwemjywttfssdmhtnsnftbjxlxsvxqrcmgihfcdhetybgadvaizwulzoghukdwykzgrojftrlvhwrlqcgbqmplqjnvstruhglctiitaybbuenuqvcxpyanoqkuvhyocoisqokvmylydvxakkcnjuuxtchwcifuovsvqgstaxzuhnojfkkphkmeizdkwasoprdjporhfyxykirbjazoqmcbeohqvlhkkyaohiydawawuwbfxdurnkfespjfrtsbhshdrgquwhlkkisafrtykitlrdtbwvxrlwpihhhpahisgocdalebhfslodhuownsyvrqitwzkloqealsjrxsvxcigmmjsqxwokbtjxrczaeefhnqhjqqmaarehkxawfmxeyhkxicqmctwvqyjvlpiyb
Output: NO

Example 2:

Input: bpyzqjksudxhqunitgzhbiwyreqjzeekpzowaivmairqigmlpugsfwzhbaxsezpmcjlzjvhjywzbfjbdrajjqwkupnbkvhbbqonthoohtnoqbbhvkbnpukwqjjardbjfbzwyjhvjzljcmpzesxabhzwfsguplmgiqriamviawozpkeezjqerywibhzgtinuqhxduskjqzypb
Output: YES

Example 3:

Input: gtpuuscnqrsbduarrnsnvcafacvnsnrraudbsrqncsuuptg
Output: YES

Constraints:

1 <= |s| <= 1691; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.