HDU 5058 So easy(水)
来源:互联网 发布:淘宝拍摄照片用什么灯 编辑:程序博客网 时间:2024/05/22 07:51
HDU 5058 So easy
题目链接
签到题,直接set乱搞即可
代码:
#include <cstdio>#include <cstring>#include <algorithm>#include <vector>#include <set>using namespace std;int n;set<int> s1, s2;int num[105];bool judge() {if (s1.size() != s2.size()) return false;set<int>::iterator it1 = s1.begin(), it2 = s2.begin();while (it1 != s1.end() && it2 != s2.end()) {if (*it1 != *it2) return false;it1++; it2++;}return true;}int main() {while (~scanf("%d", &n)) {s1.clear(); s2.clear();int tmp;for (int i = 0; i < n; i++) {scanf("%d", &tmp);s1.insert(tmp);}for (int i = 0; i < n; i++) {scanf("%d", &tmp);s2.insert(tmp);}printf("%s\n", judge() ? "YES" : "NO");}return 0;}
0 0
- HDU 5058 So easy(水)
- hdu 5058 So easy
- HDU 5058 So easy
- hdu 5058 So easy
- hdu 5058 So easy
- HDU 5058 So easy
- HDU-#5058 So easy(set)
- hdu 5058 So easy (set)
- hdu 5058 So easy(去重)
- HDU 5058 So easy(STL 集合set的运用)
- HDU 5058 So easy(STL set运用)
- hdu 5058 So easy (排序+离散化)
- HDU 5058/BC 12A So easy
- [HDU](5058)So easy --去重
- HDU 5650 so easy 水的666
- [HDU 4565] So Easy! (数学)
- HDU 4565 So Easy!
- hdu 4565 So Easy!
- 使用graphviz绘制流程图
- C++ STL源码学习(之hash_table篇)
- xterm: _IceTransSocketUNIXConnect: Cannot connect to non-local..
- 黑马程序员--标识符,常亮,变量,运算符,语句
- 用ISO C++实现自己的信号槽(Qt另类学习)
- HDU 5058 So easy(水)
- RedHat Linux 相关日志 和常用命令
- 找工作--笔试面试--准备4
- 2014.10.10 ——Jim Foley第二场讲座User Interface Design——An Overview
- Codeforces 327B-Hungry Sequence(素数筛)
- Struts2的开发步骤
- cocos2d-x(一)开发环境搭建
- 傅里叶变换的通俗理解
- 【CUDA学习笔记】纹理操作细节