All submissions for this problem are available.
Indhran II , A machine on moon which collects data about the surface of moon , sends a string S . Due to external disturbances , the string has junk data added to it. A string is accepted in the earth’s base station if it is a word, phrase, number which reads the same backward or forward. Without considering the disturbances check if the string satisfies the above condition.
First line contains the number of test cases T.
Following T lines have a string S.
For each test case, output ‘YES’ if the string S is acceptable or ‘NO’ if the string S doesn’t satisfy the conditions.
2<=length of S<=1000
Input: 2 #anokha$ ahko(!na%** Madam Output: YES NO
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.