码迷,mamicode.com
首页 > 其他好文 > 详细

思维题 URAL 1718 Rejudge

时间:2015-07-15 22:34:31      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:

 

题目传送门

 1 /*
 2     题意:数据加10组,再删掉第6组数据,问rejudge后最少最多几个作者收到邮件
 3     思维题:当错在6时结果是不一定,错在7时是一定改变,因为会变成6
 4     思路没错,但用结构题排序一直WA,代码有毒!学习使用set容器。
 5 */
 6 #include <cstdio>
 7 #include <algorithm>
 8 #include <cstring>
 9 #include <cmath>
10 #include <string>
11 #include <iostream>
12 #include <set>
13 using namespace std;
14 
15 const int MAXN = 1e3 + 10;
16 const int INF = 0x3f3f3f3f;
17 string name, res;
18 set<string> mn, mx;
19 
20 int main(void)        //URAL 1718 Rejudge
21 {
22 //    freopen ("H.in", "r", stdin);
23 
24     int n;    scanf ("%d", &n);
25     for (int i=1; i<=n; ++i)
26     {
27         cin >> name >> res;
28         if (res == "CE")    continue;
29         else if (res == "AC")
30         {
31             mx.insert (name);    continue;
32         }
33         else
34         {
35             int x;    scanf ("%d", &x);
36             if (x == 6)    mx.insert (name);
37             else if (x == 7)
38             {
39                 mn.insert (name);    mx.insert (name);
40             }
41         }
42     }
43 
44     printf ("%d %d\n", mn.size (), mx.size ());
45 
46     return 0;
47 }

 

思维题 URAL 1718 Rejudge

标签:

原文地址:http://www.cnblogs.com/Running-Time/p/4649534.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!