Tablet cool
* Simple echo string
Time Limit: 1000 MS memory limit: 32 MB
Description
The "Reply string" is a string with the same reading and reverse reading, such as "level" or "Noon"
And so on. Write a program to check whether the read string is a "reply ".
Input description
The input contains multiple test instances. The first line of the input data is a positive integer N, indicating
Number, followed by N strings.
Output description
If a string is a return string, "yes" is output; otherwise, "no" is output ".
Sample Input
4
Level
ABCDE
Noon
Haha
Sample output
Yes
No
Yes
No
*/
# Include <stdio. h>
# Include <string. h>
Int ishuiwen (char STR [], int N)
{
Int I;
For (I = 0; I <= N & STR [I ++] = STR [-- N];);
If (I = n + 2 | I = n + 1)
Return 1;
Else
Return 0;
}
Int main (void)
{
Char STR [100];
Int N, I, j, TEM [100];
While (scanf ("% d", & n) + 1 ){
For (j = I = 0; I <n; ++ I ){
Scanf ("% s", STR );
Getchar ();
If (ishuiwen (STR, strlen (STR )))
TEM [J ++] = 1;
Else
TEM [J ++] = 0;
}
For (I = 0; I <j; ++ I ){
If (TEM [I])
Printf ("Yes/N ");
Else
Printf ("No/N ");
}
}
Return 0;
}