思维题+set URAL 1718 Rejudge
2015-07-15 21:20
246 查看
题目传送门
/* 题意:数据加10组,再删掉第6组数据,问rejudge后最少最多几个作者收到邮件 思维题:当错在6时结果是不一定,错在7时是一定改变,因为会变成6 思路没错,但用结构题排序一直WA,代码有毒!学习使用set容器。 */ #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> #include <string> #include <iostream> #include <set> using namespace std; const int MAXN = 1e3 + 10; const int INF = 0x3f3f3f3f; string name, res; set<string> mn, mx; int main(void) //URAL 1718 Rejudge { // freopen ("H.in", "r", stdin); int n; scanf ("%d", &n); for (int i=1; i<=n; ++i) { cin >> name >> res; if (res == "CE") continue; else if (res == "AC") { mx.insert (name); continue; } else { int x; scanf ("%d", &x); if (x == 6) mx.insert (name); else if (x == 7) { mn.insert (name); mx.insert (name); } } } printf ("%d %d\n", mn.size (), mx.size ()); return 0; }
相关文章推荐
- RHEL7 -- 识别文件系统和设备
- Android中使用Volley开源库进行Http网络请求(POST方式)
- Apache 安装
- python技巧总结--持续更新
- Qt中qApp
- Objective-C--Runtime机制
- COJ 1004: Xi and Bo 并查集
- 在android创建bitmap避免低记忆法
- 苹果没法删除部分照片的问题
- asp.net 文件批量移动重命名
- Objective-C--Runtime机制
- 机器学习(一)开源资料库整理--国外全英课程
- LeetCode---(225)Implement Stack using Queues
- 换个地方感到很反感
- C++ const限定符
- android string.xml格式化
- poj 1463
- Linux中RPM包安装、查询、卸载
- leetcode 日经贴,Cpp code -Basic Calculator
- 在oracle数据库中只知道他的生日,怎么查出他的年龄