Responsive image

问题 1509 --Contest

1509: Contest

时间限制: 1 Sec  内存限制: 128 MB
提交: 2  解决: 2
[提交][状态][讨论版][命题人:]

题目描述

Hi, welcome to 平顶山学院OnlineJudge and best regards to you! To avoid bringing you any troubles, you should know our system how to judge your contest score after you submit your code. Your task in this problem is to compute the score for a number of submissions from a programming contest contestant.

输入描述

Each line of input contains a problem identifier (a single letter from A to Z), a time (in minutes from 0 to 300), and a judgement (the word "correct" or the word "incorrect"). The input is in ascending order by time, and there will be at most one "correct" judgement for each problem. A line containing '-' follows the last line of input.

输出描述

The output has two components: solved and penalty. solved is the number of distinct problems with a "correct" judgement. penalty is the sum of the time at which each distinct problem is first judged "correct", and 20 for each "incorrect" submission for a problem that is later judged "correct".

样例输入

A 100 correct
B 110 incorrect
B 111 correct
C 200 correct
D 233 incorrect
-

样例输出

3 431

来源

zj 

[提交][状态]
ACM算法攻关部