QUALITY - Contest System Quality Assurance Tester

no tags 

Write a program to score a small, three-problem programming contest. Each input line contains six space-separated integers representing raw score data. The first three integers are in the range 0 . . . 100000. They represent seconds taken to solve the first, second, and third problems, respec- tively. Zero seconds indicates that a problem has not been solved. The last three integers are in the range 0 . . . 100, representing the attempts taken to solve the first, second, and third problems, respectively. Every failed attempt is penalized with 20 minutes, but only for problems that are eventually solved.

Each output line should begin with the string team, followed by a single space, the input line number, a colon, a single space, the number of solved problems, a comma, a single space, and the total number of seconds including penalties it took for the solved problems.

Input:
0 777 0 4 1 1
1 1 1 1 1 1

Output:
team 1: 1, 777
team 2: 3, 3

hide comments
levim: 2015-11-18 23:25:44

Last edit: 2016-09-12 01:36:45
karthik1997: 2015-07-15 06:41:55

you have to add penalities but not subtract them. costed me 3 wa :(

Harshit: 2015-06-13 16:27:29

silly mistakes :(

Samil Vargas: 2013-12-30 23:33:05

i dont use EOF cause sometimes return Compilation Error i recommend to use while(cin >> varible != '\0')

marwan akkad: 2012-06-20 17:24:15

too easy I got AC for the first submission

: 2012-06-17 12:56:08

at first it looked hard...bt its easy if you know how the scoring is done...!!!

xxx: 2012-06-12 08:30:37

Some more test cases:
INPUT ->
0 0 1 1 1 1
1 1 1 4 3 2
10 0 20 1 8 1

OUTPUT->
team 1: 1, 1
team 2: 3 , 7203
team 3: 2 , 30

dev2: 2012-06-11 07:09:37

please i need more test cases can anyone help me out ....

Ranker: 2012-06-01 12:31:48

Carefully note that the penalty is 20 min and the time given is in seconds.

nani: 2012-03-18 17:10:56

Last edit: 2013-07-10 16:48:52

Added by:Daniel Gómez Didier
Date:2008-11-18
Time limit:1.710s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:2007 U.Nacional - Circuito de Maratones ACIS / REDIS