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
sunny: 2012-01-03 10:57:38

guys please give a good link or something to implement EOF in c/c++.. please help! thanks

Abhra: 2011-12-27 09:38:43

if the question is unsolved, then is there no penalty for wrong attempt???

Sukhmeet :): 2010-11-01 07:34:57

people getting TLE may check the input pattern..
Check only the first argument as EOF ...

P.B.MUKUND: 2010-10-06 09:43:39

is the penalty 20 min or 20 seconds???
got it....thanks..:)

Last edit: 2010-10-06 09:44:42
vimal raj sharma old account: 2009-12-14 04:18:18

u can implement EOF as

while( scanf(any number and type of argument) != EOF)
{
// code
}

Jargon: 2009-12-12 19:28:53

Please read comments below. There are no given restrictions; just take input until EOF.

vato: 2009-12-12 14:57:25

there are only 2 teams?

Mohamed Maher: 2009-11-16 16:18:27

is each attempt i should increase the time by 20 except the last attempt

Last edit: 2009-11-16 16:57:27
Stephen Fulwider: 2009-11-14 06:37:17

End Of File

aNirBan: 2009-10-13 13:09:08

what is EOF?

Last edit: 2009-10-13 13:10:55

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