UVA 1339 Ancient Cipher(水题)
来源:互联网 发布:制作合格证的软件 编辑:程序博客网 时间:2024/05/18 02:12
题意好难看懂。
//// main.cpp// Richard//// Created by 邵金杰 on 16/10/3.// Mail:1016427040@qq.com or jasonshaosjj@gmail.com// Copyright © 2016年 邵金杰. All rights reserved.//#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=100+10;int a[26],b[26];char s1[maxn],s2[maxn];int main(){ while(scanf("%s%s",s1,s2)!=EOF) { memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); for(int i=0;s1[i];i++) {a[s1[i]-'A']++;b[s2[i]-'A']++;} sort(a,a+26); sort(b,b+26); bool ok=true; for(int i=0;i<26;i++) if(a[i]!=b[i]) {ok=false;break;} if(ok) printf("YES\n"); else printf("NO\n"); } return 0;}
0 0
- 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-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
- 单例模式及C++实现代码
- HDOJ 4418 Time travel (bfs + 高斯消元)
- 第六周 项目5-排队看病模拟
- Eclipse复制javaweb项目后需要修改的内容(解决server视图中项目名后有括号为原项目名的方法)
- ViewPager图片循环播放控件(手动可控制)-----ConvenientBanner
- UVA 1339 Ancient Cipher(水题)
- Fragment切换
- 我的Git 使用经历---初次使用
- php隐藏Notice提示
- Java 基础
- ORA-22992:无法使用远程表选择的LOB定位符
- 第一行代码阅读推荐
- 区间DP-hdu5115-Dire Wolf
- WEB渗透测试之踩点