网址:http://zju.acmclub.com/index.php?app=problem_title&id=1&problem_id=21373
简单:
#include<stdio.h> #include<string.h> int main(){ char key[10]; int vis[123],flag,count; while(scanf("%s",key) != EOF){ memset(vis,0,sizeof(int) * 123); int len = strlen(key); int i; for(i = 0; i < len; i++){ vis[key[i]]++; } flag = 0,count = 0; for(i = 97; i <= 122; i++){ if(vis[i] % 2 != 0){ flag++; } } if(flag == 0 || flag == 1){ printf("Yes\n"); }else{ printf("No\n"); } } return 0; }