HDU 2029

来源:互联网 发布:淘宝上每日好店在哪 编辑:程序博客网 时间:2024/05/17 08:39
 

http://acm.hdu.edu.cn/viewcode.php?rid=4753316

回文题(水题)

#include <stdio.h>#include <string.h>int main(void){    int n;    char a[1000];    char b[1000];    scanf("%d%*c", &n);       while (n--)    {        gets(a);        strcpy(b, a);        strrev(a);//倒置字符串        puts(strcmp(b,a) ? "no" : "yes");    }    return 0;}

原创粉丝点击