//思路:对字符串全体进行遍历并计数,如果出现一个奇数或者无奇数则yse,否则NO;
#include<stdio.h>
#include<string.h>
char num[1001];
char alp[30];
int main()
{while (scanf("%s",num)!=EOF){int cnt=0;int n=strlen(num); for(int i=0;i<n;i++){alp[num[i]-'a']++;}for(int i=0;i<26;i++){if(alp[i]%2!=0) cnt++;}if(cnt>=2) printf("No\n");else printf("Yes\n"); memset(num,0,sizeof(num));memset(alp,0,sizeof(alp)); }return 0;
}
详细解决方案
XTU OJ Palindrome 1351
热度:33 发布时间:2023-12-04 21:58:22.0
相关解决方案
- 【构造】AGC001 Arrays and Palindrome
- LeetCode 409. Longest Palindrome
- 1351. 统计有序矩阵中的负数
- LintCode 136 / LeetCode 131 Palindrome Partitioning
- LeetCode 409 Longest Palindrome
- LeetCode 125 Valid Palindrome
- Leetcode —— Palindrome Number
- 1351: 小鱼比可爱Ⅱ
- Educational Codeforces Round 62 (Rated for Div. 2) E. Palindrome-less Arrays(组合+DP+思维)
- UVA 12050 Palindrome Numbers (规律题)*
- leetcode 9. palindrome-number (回文数)
- leetcode 234. Palindrome Linked List (判断链表是否回文)
- leetcode 125 Valid Palindrome(判断回文字符)
- leetcode 9. Palindrome Number(判断是不是回文数)
- Leetcode 1351. 统计有序矩阵中的负数(DAY 173)---- 二分查找学习期
- 【Codeforces Round#620 (Div. 2)】B. Longest Palindrome 题解
- 歌唱王国Tokitsukaze, CSL and Palindrome Game[HDU多校3][PAM][数学期望]
- 9. Palindrome Number(回看)
- 【博弈论】B1. Palindrome Game (easy version)—— Codeforces Round #721 (Div. 2)
- LeetCode刷题笔记-009:palindrome number(回文数)
- HDU 4632 Palindrome subsequence(动态规划)
- Codeforces Round #311 (Div. 2) E - Ann and Half-Palindrome(字典树+dp)
- UPC 1336、1351、1353、1631、2655
- HDU - 4632 Palindrome subsequence(区间DP,回文串)
- 欧拉计划004--Largest palindrome product
- Leetcode 214. Shortest Palindrome
- Leetcode 1616. Split Two Strings to Make Palindrome (python+cpp)
- Leetcode 1400. Construct K Palindrome Strings (python)
- Cheapest Palindrome(最便宜的回文)
- leetcode:Palindrome Number 回文数的判定