HDU 6023 Automatic Judge
来源:互联网 发布:tcp拥塞控制算法 编辑:程序博客网 时间:2024/06/06 08:48
Automatic Judge
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 77 Accepted Submission(s): 41
Problem Description
Welcome to HDU to take part in the second CCPC girls’ competition!
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.
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.
2.
3.
4.
5.
6.
7.
8.
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.
Input
The first line of the input contains an integer T(1≤T≤20) , denoting the number of test cases.
In each test case, there are two integersn(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 followingm 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 thet in the input is in ascending order and every t is unique.
In each test case, there are two integers
In the following
Output
For each test case, print a single line containing two integersA and B , denoting the number of problems the team passed and the penalty.
Sample Input
13 51002 00:02 AC1003 00:05 WA1003 00:06 WA1003 00:07 AC1002 04:59 AC
Sample Output
2 49
题意:就是我们平时做题的得分标准,做对了记录时间,如果做了n次后做对的,就罚时n个20分钟,始终不对的不管,对的只管第一次对的时间。
#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int main(){ int n,m,t,j,i; bool ac[1002]; int p[1002]; int t1,t2; char a[3]; scanf("%d",&t); while(t--) { scanf("%d%d",&n,&m); memset(ac,0,sizeof(ac)); memset(p,0,sizeof(p)); for(i=0; i<m; i++) { scanf("%d %d:%d %s",&j,&t1,&t2,a); j-=1000; if(!ac[j]) { if(a[0]=='A') { p[j]+=t1*60; p[j]+=t2; ac[j]=1; } else { p[j]+=20; } } } int sum=0,s=0; for(i=1; i<=n; i++) { if(ac[i]) { sum+=p[i]; s++; } } printf("%d %d\n",s,sum); } return 0;}
1 0
- HDU 6023 Automatic Judge
- HDU 6023 Automatic Judge
- HDU 6023 Automatic Judge
- HDU 6023 Automatic Judge(水题)
- HDU 6023 Automatic Judge (模拟)
- HDU Automatic Judge
- hdoj 6023 Automatic Judge
- 6023 Automatic Judge
- (HDU 6023 女生专场)Automatic Judge 简单模拟
- Automatic Judge
- Automatic Judge
- HDU6023-Automatic Judge
- HDU6023 Automatic Judge
- HDU6023-Automatic Judge-简单模拟
- 2017女生赛 1001 Automatic Judge【】
- 2017CCPC女生赛 Automatic Judge
- hdu6023-Automatic Judge-2017中国大学生程序设计竞赛
- HDU 1073 Onlien Judge
- poj1952(经典dp题)
- PopupWindow的使用
- Git上传文件到远程仓库||更改远程仓库目录下的内容
- 2017山东省大学生程序设计竞赛(青岛科技大学)引发的感想
- JavaEE学习03--Servlet
- HDU 6023 Automatic Judge
- c++11 生产者和消费者模型
- 【优化】关于FOR ALL ENTRIES的小结
- http常用相应状态码
- 简单接口和继承的应用
- 合并两个排序的链表
- (2)Hadoop 2.6.1伪分布搭建
- 项目进度(一)- 总体架构
- 计算机网络