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 ...
随机推荐
- spring-3-mvc-hello-world-example
http://www.mkyong.com/spring3/spring-3-mvc-hello-world-example/
- c语言学习上的思考与心得
由于这段时间在c语言的学习中,表现的很努力并且完成作业态度认真,所以得到了老师奖励的小黄衫. 以下是我对于c语言的学习感受与心得. 学习感受与心得 我选择计算机的这个专业,是因为我对计算机的学习很有兴 ...
- java中关于集合的知识点梳理
一:概述 1.集合的特点 只存储对象,集合长度是可变的,集合可以存储不同类型的对象. 2.集合框架 Collection List | | Set ArrayList Linked ...
- JVM内存状况查看方法和分析工具-jmap
jmap -heap 27657 Attaching to process ID 27657, please wait... Debugger attached successfully. Serve ...
- Cocos2d-JS轻量级开发
官方提供了另外一种使用cocos2d js的方式,更适合web开发者,只要引用一个js就可以了 1.下载Cocos2d-JS Lite Version(去下载>>) 下载下来的将是一个完整 ...
- 利用ArcMap对tiff或jpg格式地图图片的配准步骤
原文:利用ArcMap对tiff或jpg格式地图图片的配准步骤 在实际应用中,经常会遇到提供一张高精度的地图图片文件,如何对将该图片进行配准(使图片具有经纬度坐标). 当然我们得有一些大概的参考图层, ...
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication解决办法
mysqlnd是个好东西.不仅可以提高与mysql数据库通信的效率,而且也可以方便的设置一些超时.如,连接超时,查询超时.但是,使用mysqlnd的时候,有个地方需要注意.就是服务端的密码格式不能使用 ...
- cf708B. Recover the String---(构造法)
题目链接:http://codeforces.com/problemset/problem/708/B 意思是给出四个参数 a00表01串中00对的数量 a01表01串中01对的数量 a10表01串中 ...
- iOS面试题01
1.#import和#include.@class有什么区别?#import<>和#import“”又有什么区别? 答:1.#import和#include都能完整地包含某个文件的内容,# ...
- urlencode和rawurlencode的区别
摘自http://blog.csdn.net/doggie1024/article/details/5698615 urlencode:返回字符串,此字符串中除了 -_. 之外的所有非字母数字字符都将 ...