HDU6023 Automatic Judge 2017-05-07 18:30 73人阅读 评论(0) 收藏
Automatic Judge
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 16 Accepted Submission(s): 11
A new automatic judge system is used for this competition. During the five-hour contest time, you can submit your code to the system, then the judge will reply you. Here is a list of the judge's replies and their meaning:
1. Accepted(AC):
Yes, your program is correct. You did a good job!
2. PresentationError(PE) :
Your program's output format is not exactly the same as required by the problem, although the output is correct. This usually means the existence of omitted or extra blank characters (white spaces, tab characters and/or new line characters) between any two
non-blank characters, and/or blank lines (a line consisting of only blank characters) between any two non-blank lines. Trailing blank characters at the end of each line and trailing blank lines at the of output are not considered format errors. Check the output
for spaces, blank lines, etc. against the problem's output specification.
3. WrongAnswer(WA) :
Correct solution not reached for the inputs. The inputs and outputs that we use to test the programs are not public (it is recomendable to get accustomed to a true contest dynamic :-)
4. RuntimeError(RE) :
Your program failed during the execution and you will receive the hints for the reasons.
5. TimeLimitExceeded(TLE) :
Your program tried to run during too much time.
6. MemoryLimitExceeded(MLE):
Your program tried to use more memory than the judge default settings.
7. OutputLimitExceeded(OLE):
Your program tried to write too much information. This usually occurs if it goes into a infinite loop.
8. CompilationError(CE):
The compiler fails to compile your program. Warning messages are not considered errors. Click on the judge's reply to see the warning and error messages produced by the compiler.
For each submission, if it is the first time that the judge returns ``AC'' on this problem, then it means you have passed this problem, and the current time will be added to the penalty of your team. In addition, every time you pass a problem, each unsuccessful
try for that problem before is counted as 20 minutes penalty, it should also be added to the penalty of your team.
Now given the number of problems in the contest and the submission records of a team. Please write a program to calculate the number of problems the team passed and their penalty.
denoting the number of test cases.
In each test case, there are two integers n(1≤n≤13) and m(1≤m≤100) in
the first line, denoting the number of problems and the number of submissions of a team. Problems are labeled by 1001, 1002, ..., 1000+n.
In the following m lines,
each line contains an integer x(1001≤x≤1000+n) and
two strings t(00:00≤t≤05:00) and s,
denoting the team submits problem x at
time t,
and the result is s. t is
in the format of HH:MM, while s is
in the set \{AC, PE, WA, RE, TLE, MLE, OLE\}. The team is so cautious that they never submit a CE code. It is guaranteed that all the t in
the input is in ascending order and every t is
unique.
denoting the number of problems the team passed and the penalty.
1
3 5
1002 00:02 AC
1003 00:05 WA
1003 00:06 WA
1003 00:07 AC
1002 04:59 AC
2 49
————————————————————————————————————
题意:算罚时
思路:先判断是否已AC,若AC不处理,最后把AC的题罚时加起来
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <cmath>
#include <map>
#include <cmath>
#include <set>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <functional> using namespace std; #define LL long long
const int INF=0x3f3f3f3f; int n,m;
struct node
{
int sum,flag;
} x[1200]; int main()
{
int t;
scanf("%d",&t);
while(t--)
{
scanf("%d%d",&n,&m);
int id,h,mm;
char ch[20];
memset(x,0,sizeof x);
for(int i=1; i<=m; i++)
{
scanf("%d%d:%d%s",&id,&h,&mm,ch);
if(!strcmp(ch,"AC")&&!x[id].flag) x[id].flag=1,x[id].sum+=60*h+mm;
else if(!x[id].flag) x[id].sum+=20;
}
int cnt=0,ans=0;
for(int i=1001; i<=1000+n; i++)
if(x[i].flag) cnt++,ans+=x[i].sum;
printf("%d %d\n",cnt,ans);
}
return 0;
}
HDU6023 Automatic Judge 2017-05-07 18:30 73人阅读 评论(0) 收藏的更多相关文章
- winform 子窗体数据改变刷新父窗体 分类: WinForm 2014-05-06 18:30 246人阅读 评论(0) 收藏
两种方法实现: 第一种,传时间变量,主窗体要不停的刷新数据,占用资源比较大. 第二种,用this,感觉比较好用,建议用这种方法. 举例: 主窗体命名:FormA; 子窗体命名:FormB; 数据绑定方 ...
- c++map的用法 分类: POJ 2015-06-19 18:36 11人阅读 评论(0) 收藏
c++map的用法 分类: 资料 2012-11-14 21:26 10573人阅读 评论(0) 收藏 举报 最全的c++map的用法 此文是复制来的0.0 1. map最基本的构造函数: map&l ...
- [CS]C#操作word 2016-04-17 18:30 1506人阅读 评论(35) 收藏
最近在做的项目已经改了好几版,最近这一版用到了word,当然不是直接使用word,而是使用第三方的ActiveX控件:dsoframer.ocx,此控件的使用和其他控件的使用流程没有任何区别,接下来介 ...
- 第十二届浙江省大学生程序设计大赛-Lunch Time 分类: 比赛 2015-06-26 14:30 5人阅读 评论(0) 收藏
Lunch Time Time Limit: 2 Seconds Memory Limit: 65536 KB The 999th Zhejiang Provincial Collegiate Pro ...
- 移植QT到ZedBoard(制作运行库镜像) 交叉编译 分类: ubuntu shell ZedBoard OpenCV 2014-11-08 18:49 219人阅读 评论(0) 收藏
制作运行库 由于ubuntu的Qt运行库在/usr/local/Trolltech/Qt-4.7.3/下,由makefile可以看到引用运行库是 INCPATH = -I/usr//mkspecs/d ...
- Rebuild my Ubuntu 分类: ubuntu shell 2014-11-08 18:23 193人阅读 评论(0) 收藏
全盘格式化,重装了Ubuntu和Windows,记录一下重新配置Ubuntu过程. //build-essential sudo apt-get install build-essential sud ...
- highgui.h备查 分类: C/C++ OpenCV 2014-11-08 18:11 292人阅读 评论(0) 收藏
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMP ...
- HDU6026 Deleting Edges 2017-05-07 19:30 38人阅读 评论(0) 收藏
Deleting Edges Time ...
- Pots 分类: 搜索 POJ 2015-08-09 18:38 3人阅读 评论(0) 收藏
Pots Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11885 Accepted: 5025 Special Judge D ...
随机推荐
- Excel 2003-单元格输入中带记忆功能
最近有个同事问我,如何在Excel单元格输入中带记忆功能?其实很简单: 工具ó选项ó编辑ó将“记忆式键入”项选中ó确定: //附图[效果图]:
- js 获取字符串的 像素 宽度 ----字符串格式化输出
function getLenPx(str, font_size) { var str_leng = str.replace(/[^\x00-\xff]/gi, 'aa').length; retur ...
- SQL 数据库事务 存储过程练习
数据库事务: 数据库事务(Database Transaction) 是指作为单个逻辑工作单元执行的一系列操作. 事务处理可以确保除非事务性单元内的所有操作都成功完成,否则不会永久更新面向数据的资源. ...
- css样式占位和不占位隐藏元素的方法
不占位隐藏:display:none; 占位隐藏:visibility:hidden;
- Ansible Playbook Variables
虽然自动化存在使得更容易使事情重复,但所有的系统可能不完全一样. 在某些系统上,您可能需要设置一些与其他操作略有不同的行为或配置. 此外,一些观察到的远程系统的行为或状态可能需要影响如何配置这些系统. ...
- 1、JDK自带注解
1.何为注解? 概念:注解(Annotation),也叫元数据.一种代码级别的说明.它是JDK1.5及以后版本引入的一个特性,与类.接口.枚举是在同一个层次.它可以声明在包.类.字段.方法.局部变量. ...
- BLACK PHOSPHORUS: THE NEW GRAPHENE?
Materials World magazine,3 Oct 2015 Link:http://www.iom3.org/materials-world-magazine/news/2015/oct/ ...
- 如何使用eclipse搭建maven环境以及常见的错误
这篇博客适合零基础学习maven,搭建maven以及运行项目,常见的错误,我会在结尾写出说明白,看是否和大家的错误一样,或者文章的括号注释部分也会写出一些注意点. 第一步:就是下载maven,以及配置 ...
- 兼容谷歌、火狐、IE7.0以上浏览器div+css实现的带有蒙版的半透明弹窗效果[xyytit]
整个页面变暗的蒙版效果,带有半透明边框的弹窗,用在网站里一定很酷. 最初见与奢饰品购物网站YMALL,后边研究了下,自己做了这个实例. 技术要点:css中几种透明样式的使用.不同的样式在不同的浏览器中 ...
- jquery-jsonp插件解决跨域问题
用jquery-jsonp插件解决ajax跨域问题,既可以实现ajax同样的请求效果,而且server服务端的相关代码也不用做任何改变. 代码如下: var url="http://loca ...