UVa 1339 Ancient
来源:互联网 发布:centos7编译安装mysql 编辑:程序博客网 时间:2024/06/06 13:24
#include<stdio.h>#include<string.h>#include<iostream>#include<algorithm>using namespace std;char s1[109],s2[109];int cnt1[26];int cnt2[26];int main(){ while(~scanf("%s",s1)){ scanf("%s",s2); memset(cnt1,0,sizeof(cnt1)); memset(cnt2,0,sizeof(cnt2)); int flag=0; for(int i=0;i<strlen(s1);i++) cnt1[s1[i]-'A']++; for(int i=0;i<strlen(s2);i++) cnt2[s2[i]-'A']++; sort(cnt1,cnt1+26); sort(cnt2,cnt2+26); for(int i=0;i<26;i++){ if(cnt1[i]!=cnt2[i]){ flag++; break; } } if(!flag) puts("YES"); else puts("NO"); } return 0;}
阅读全文
0 0
- UVA 1339 - Ancient Cipher
- uva 1339 Ancient Cipher
- Uva - 1339 - Ancient Cipher
- UVA 1339 - Ancient Cipher
- UVA 1339 - Ancient Cipherguo
- UVa:1339 Ancient Cipher
- UVA 1339 - Ancient Cipher
- UVA-1339 - Ancient Cipher
- UVa 1339 Ancient Cipher
- UVa 1339 Ancient Cipher
- UVa 1339 - Ancient Cipher
- UVa 1339 - Ancient Cipher
- uva 1339Ancient Cipher
- UVa 1339 - Ancient Cipher
- Uva 1339 - Ancient Cipher
- 【Uva 1339】 Ancient Cipher
- UVa-1339 - Ancient Cipher
- Uva - 1339 - Ancient Cipher
- 改进版基于Spark2.2使用Spark SQL和mysql数据库进行诗歌查询及自动集句
- 使用DOM 、DOM4J解析XML
- factorial c代码实现
- 我的学习记录22
- 贪心算法 找钱问题
- UVa 1339 Ancient
- leetcode14. Longest Common Prefix
- numpy部分常用函数
- Matlab:从无到有——LeNet(1)
- ZOJ 3987 Numbers(枚举)
- PADS Router无法自动扇出
- java双引号中嵌入变量
- 自己写的自动化部署小工具 : Webhooks
- spring boot框架学习5-spring boot的web开发(1)