poj: 2159
简单题,看起来很凶
#include <iostream>
#include <stdio.h>
#include <string>
#include <stack>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
vector<);
vector<);
string first, second;
cin >> first >> second;
; i < first.size(); ++i) {
S[first[i]-'A']++;
T[second[i]-'A']++;
}
bool same = true;
sort(S.begin(), S.end());
sort(T.begin(), T.end());
; i < ; ++i) {
if (S[i] != T[i]) {
same = false;
break;
}
}
if (same) cout << "YES" << endl;
else cout << "NO" << endl;
;
}
poj: 2159的更多相关文章
- POJ 2159 Ancient Cipher 难度:0
题目链接:http://poj.org/problem?id=2159 #include <cstring> #include <cstdio> #include <cc ...
- Poj 2159 / OpenJudge 2159 Ancient Cipher
1.链接地址: http://poj.org/problem?id=2159 http://bailian.openjudge.cn/practice/2159 2.题目: Ancient Ciphe ...
- POJ 2159 Ancient Cipher
题意:被题意杀了……orz……那个替换根本就不是ASCII码加几……就是随机的换成另一个字符…… 解法:只要统计每个字母的出现次数,然后把数组排序看相不相同就行了…… 代码: #include< ...
- 最小费用最大流模板 poj 2159 模板水题
Going Home Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15944 Accepted: 8167 Descr ...
- poj 2159 D - Ancient Cipher 文件加密
Ancient Cipher Description Ancient Roman empire had a strong government system with various departme ...
- POj 2159 Dividing
Dividing Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 71453 Accepted: 18631 Descri ...
- B - Ancient Cipher POJ - 2159 解题报告
内容: Ancient Roman empire had a strong government system with various departments, including a secret ...
- poj很好很有层次感(转)
OJ上的一些水题(可用来练手和增加自信) (POJ 3299,POJ 2159,POJ 2739,POJ 1083,POJ 2262,POJ 1503,POJ 3006,POJ 2255,POJ 30 ...
- POJ题目分类推荐 (很好很有层次感)
著名题单,最初来源不详.直接来源:http://blog.csdn.net/a1dark/article/details/11714009 OJ上的一些水题(可用来练手和增加自信) (POJ 3299 ...
随机推荐
- 各大网站CSS代码初始化集合
css代码之所以初始化,是因为能尽量减少 各浏览器之间的兼容性问题! 腾讯QQ官网 样式初始化 body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fiel ...
- [qemu] 在前端驱动使用virtio的情况下,如何让后端使用vhost-user [未解决]
首先,如果你更关心原理和知识,请读读这个 http://chuansong.me/n/2186528 (值得细细的逐字读). 在<<深入浅出dpdk>>中提到,vhost-us ...
- .Net使用CDO发送邮件,需安装注册的组件
regsvr32 C:\Program Files\Common Files\System\ado\msado15.dll regsvr32 CDOEX.DLL
- 局部变量、结构体和main函数
在函数中定义的变量称为自动局部变量.因为每次调用该函数时,它们都自动“创建”,并且它们的只对于函数来说是局部的,局部对象的变量都会默认为空.局部变量的值只能在定义该变量的函数中访问,不能从函数之外访问 ...
- WPF绑定Model的实例对象
创建一个用户控件 1. behindcode指定this.DataContext=XXViewModel 2. "{Binding DataContext.EditModel.MId,Rel ...
- net use
net use * \\ipaddr\share "password" /user:"username" /persistent:yes 在运行中输入“\\”+ ...
- asp.net跳转页面的三种方法比较(转)
2006-10-20 14:32 [小 大] 来源: 博客园 评论: 0分享至: 百度权重查询 词库网 网站监控 服务器监控 SEO监控 手机游戏 iPhone游戏 今天老师讲了三种跳转页面的方法,现 ...
- PMP--可能会涉及到的计算题
一.进度管理里的历时三点估算历时的三点估算可能会出现在进度管理的计算题里.以下公式,大家要记住:说一下历时的三点估算中的几个值:1.最有可能的历时估算:Tm2.最乐观的历时估算: To3.最悲观的历时 ...
- Sql server中内连接语句
数据库中学生表和课程表如下: 内连接sql语句: select a.studentName,a.studentAge,b.courseName from student a inner join co ...
- linux boot logo rotate
开机logo旋转方法. 参考链接 https://www.kernel.org/doc/Documentation/fb/fbcon.txt https://community.nxp.com/thr ...