mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
22 lines
387 B
C++
22 lines
387 B
C++
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
int main()
|
||
|
{
|
||
|
char a[100],b[100];
|
||
|
int cases=0;
|
||
|
while(gets(a)&&strcmp(a,"STOP")!=0)
|
||
|
{
|
||
|
cases++;
|
||
|
strcpy(b,a);
|
||
|
strrev(a);
|
||
|
if (strcmp(a,b)==0)
|
||
|
{
|
||
|
printf("#%d: YES\n",cases);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("#%d: NO\n",cases);
|
||
|
}
|
||
|
}
|
||
|
}
|