OJ-Problems-Source/HDOJ/2163_autoAC.cpp

22 lines
387 B
C++
Raw Normal View History

#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);
}
}
}