POJ-2159-Ancient Cipher
来源:互联网 发布:java 集合的不同点 编辑:程序博客网 时间:2024/05/17 01:04
水题,
代码:
#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>using namespace std;char stra[101],strb[101];int counta[27],countb[27];int main(){ while(scanf("%s%s",stra,strb)!=EOF) {memset(counta,0,sizeof(counta));memset(countb,0,sizeof(countb));for(int i=0;i<strlen(stra);i++) counta[stra[i]-'A']++;for(int i=0;i<strlen(strb);i++) countb[strb[i]-'A']++;sort(counta,counta+26);sort(countb,countb+26);int flag=0;for(int i=0;i<26;i++) if(counta[i]!=countb[i]) {flag=1;break; }if(flag) printf("NO\n");else printf("YES\n"); } return 0;}
- POJ 2159 Ancient Cipher
- poj 2159 : Ancient Cipher
- POJ 2159 Ancient Cipher
- POJ 2159 Ancient Cipher
- poj 2159 Ancient Cipher
- POJ 2159 Ancient Cipher
- POJ 2159 Ancient Cipher
- POJ-2159-Ancient Cipher
- POJ 2159 Ancient Cipher
- poj 2159 Ancient Cipher
- POJ 2159 Ancient Cipher
- POJ 2159 Ancient Cipher
- poj 2159Ancient Cipher
- POJ 2159 Ancient Cipher
- POJ 2159 Ancient Cipher
- POJ 2159 Ancient Cipher
- POJ-2159 Ancient Cipher
- poj 2159Ancient Cipher
- Android应用程序结构及开发流程
- Android 创建新的Product
- 关于python strip
- App主界面比较
- 小米2及其他手机无法连接mac
- POJ-2159-Ancient Cipher
- ubuntu下shell脚本运行异常:bash和dash的区别
- JAVASE----02----数组
- i2c相关知识
- Windows环境变量编程设定
- /etc/ssh ssh_config 与sshd_config区别
- Android 属性系统 property
- 【Project Euler】【Problem 8】Largest product in a series
- linux-2.6.32在mini2440开发板上移植之DM9000网卡移植(3)