题目传送门

 /*
题意:数据加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 + ;
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=; 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 == ) mx.insert (name);
else if (x == )
{
mn.insert (name); mx.insert (name);
}
}
} printf ("%d %d\n", mn.size (), mx.size ()); return ;
}

思维题+set URAL 1718 Rejudge的更多相关文章

  1. 思维题 URAL 1409 Two Gangsters

    题目传送门 /* 思维题:注意题目一句话:At some moment it happened so that they shot one and the same can. 如果两个人都有射中的话, ...

  2. zoj 3778 Talented Chef(思维题)

    题目 题意:一个人可以在一分钟同时进行m道菜的一个步骤,共有n道菜,每道菜各有xi个步骤,求做完的最短时间. 思路:一道很水的思维题, 根本不需要去 考虑模拟过程 以及先做那道菜(比赛的时候就是这么考 ...

  3. cf A. Inna and Pink Pony(思维题)

    题目:http://codeforces.com/contest/374/problem/A 题意:求到达边界的最小步数.. 刚开始以为是 bfs,不过数据10^6太大了,肯定不是... 一个思维题, ...

  4. ZOJ 3829 贪心 思维题

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3829 现场做这道题的时候,感觉是思维题.自己智商不够.不敢搞,想着队友智商 ...

  5. 洛谷P4643 [国家集训队]阿狸和桃子的游戏(思维题+贪心)

    思维题,好题 把每条边的边权平分到这条边的两个顶点上,之后就是个sb贪心了 正确性证明: 如果一条边的两个顶点被一个人选了,一整条边的贡献就凑齐了 如果分别被两个人选了,一作差就抵消了,相当于谁都没有 ...

  6. C. Nice Garland Codeforces Round #535 (Div. 3) 思维题

    C. Nice Garland time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...

  7. PJ考试可能会用到的数学思维题选讲-自学教程-自学笔记

    PJ考试可能会用到的数学思维题选讲 by Pleiades_Antares 是学弟学妹的讲义--然后一部分题目是我弄的一部分来源于洛谷用户@ 普及组的一些数学思维题,所以可能有点菜咯别怪我 OI中的数 ...

  8. UVA 1394 And Then There Was One / Gym 101415A And Then There Was One / UVAlive 3882 And Then There Was One / POJ 3517 And Then There Was One / Aizu 1275 And Then There Was One (动态规划,思维题)

    UVA 1394 And Then There Was One / Gym 101415A And Then There Was One / UVAlive 3882 And Then There W ...

  9. HDU 1029 Ignatius and the Princess IV / HYSBZ(BZOJ) 2456 mode(思维题,~~排序?~~)

    HDU 1029 Ignatius and the Princess IV (思维题,排序?) Description "OK, you are not too bad, em... But ...

随机推荐

  1. [USACO5.3]巨大的牛棚Big Barn

    题目背景 (USACO 5.3.4) 题目描述 农夫约翰想要在他的正方形农场上建造一座正方形大牛棚.他讨厌在他的农场中砍树,想找一个能够让他在空旷无树的地方修建牛棚的地方.我们假定,他的农场划分成 N ...

  2. Python基础之 一 字典(dict)

    字典:是一种key - value的数据类型.语法:info = { key:value }特性:无序,key必须唯一(所以天生去重) 方法如下:del dict[key]:删除字典指定键len(di ...

  3. Codeforces Gym100495 B、D、E、F、K

    http://codeforces.com/gym/100495 K题 草地的面积减去相交的面积,计算几何,垃圾题,避免不必要的计算损失精度(能约分的约分) 卡了老子一个星期了 再加前几天的一道题 这 ...

  4. C++ fill 和memset

    以下内容来自www.cplusplus.com--------------------------------------------------- FILL: template <class ...

  5. csu1365 Play with Chain

    很显然的splay,第一次用splay操作区间...我实在佩服这个targan大佬,居然搞出这么牛逼的平衡树,调了大概5个小时终于搞定了.. #include<cstdio> #inclu ...

  6. 学习日常笔记<day09>Http协议

    1 Http协议入门 1.1 什么是http协议 http协议: 对浏览器客户端 和  服务器端 之间数据传输的格式规范 1.2 查看http协议的工具 1)使用火狐的firebug插件(右键-> ...

  7. Servlet的会话(Session)跟踪

    以下内容引用自http://wiki.jikexueyuan.com/project/servlet/session-tracking.html: HTTP是一种“无状态”协议,这意味着每次客户端检索 ...

  8. JAVA WEB接口开发简述

    目录 1. JAVA WEB接口开发简述 1.1. 基本了解 1.2. 提供接口 1.3. 调用接口 1. JAVA WEB接口开发简述 1.1. 基本了解 当我们想去访问其他网站的接口时候,而又不想 ...

  9. form 表单序列化 serialize

    在开发中有时需要在js中提交form表单数据,就需要将form表单进行序列化. jquery提供的serialize方法能够实现. $("#searchForm").seriali ...

  10. luajit利用ffi结合C语言实现面向对象的封装库

    luajit中.利用ffi能够嵌入C.眼下luajit的最新版是2.0.4,在这之前的版本号我还不清楚这个扩展库详细怎么样,只是在2.04中,真的非常爽.  既然是嵌入C代码.那么要说让lua支持 ...