codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

420A.md (1611B)


      1 Source: https://codeforces.com/problemset/problem/420/A
      2 
      3 A. Start Up
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 stdin
     16 
     17 output
     18 
     19 stdout
     20 
     21 Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
     22 
     23 The market analysts came up with a very smart plan: the name of the company should be identical to its reflection in a mirror! In other words, if we write out the name of the company on a piece of paper in a line (horizontally, from left to right) with large English letters, then put this piece of paper in front of the mirror, then the reflection of the name in the mirror should perfectly match the line written on the piece of paper.
     24 
     25 There are many suggestions for the company name, so coming up to the mirror with a piece of paper for each name wouldn't be sensible. The founders of the company decided to automatize this process. They asked you to write a program that can, given a word, determine whether the word is a 'mirror' word or not.
     26 
     27 Input
     28 
     29 The first line contains a non-empty name that needs to be checked. The name contains at most 105 large English letters. The name will be written with the next sans serif font:
     30 
     31 ![](https://espresso.codeforces.com/e066b71aeec4c647f27b184e926a76f09a39f258.png)
     32 
     33 Output
     34 
     35 Print 'YES' (without the quotes), if the given name matches its mirror reflection. Otherwise, print 'NO' (without the quotes).
     36 
     37 Examples
     38 
     39 Input
     40 
     41 ```
     42 AHA
     43 ```
     44 
     45 Output
     46 
     47 ```
     48 YES
     49 ```
     50 
     51 Input
     52 
     53 ```
     54 Z
     55 ```
     56 
     57 Output
     58 
     59 ```
     60 NO
     61 ```
     62 
     63 Input
     64 
     65 ```
     66 XO
     67 ```
     68 
     69 Output
     70 
     71 ```
     72 NO
     73 ```