Submit | All submissions | Best solutions | Back to list |
PALINCOD - Palindrome or not |
A palindrome is a word, phrase, number, or other sequence of units that can be read the same way in either direction, with general allowances for adjustments to punctuatiom and word dividers
for eg., HELLOLLEH is a Palindrome string,
and 123456789 is not a Palindrome number.
Input
t - number of testcases [ t < 1000 ].
On each of the next t lines given string.
Output
For each next t lines output the dataset number as a decimal integer (start counting at one), a space and "YES" if the given input is palindrome, or "NO" if the input is not.
Example
Input:
2
HELloolLEH
ILOVEyou
Output:
1 "YES"
2 "NO"
CHAALLENGE:- minimum size of the code
Added by: | avinash |
Date: | 2012-03-18 |
Time limit: | 1s |
Source limit: | 250B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Resource |
hide comments