QUALITY - Contest System Quality Assurance Tester

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

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

hide comments
2012-01-03 10:57:38 sunny
guys please give a good link or something to implement EOF in c/c++.. please help! thanks
2011-12-27 09:38:43 Abhra
if the question is unsolved, then is there no penalty for wrong attempt???
2010-11-01 07:34:57 Sukhmeet :)
people getting TLE may check the input pattern..
Check only the first argument as EOF ...
2010-10-06 09:43:39 P.B.MUKUND
is the penalty 20 min or 20 seconds???
got it....thanks..:)

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

while( scanf(any number and type of argument) != EOF)
{
// code
}
2009-12-12 19:28:53 Jargon
Please read comments below. There are no given restrictions; just take input until EOF.
2009-12-12 14:57:25 vato
there are only 2 teams?
2009-11-16 16:18:27 Mohamed Maher
is each attempt i should increase the time by 20 except the last attempt

Last edit: 2009-11-16 16:57:27
2009-11-14 06:37:17 Stephen Fulwider
End Of File
2009-10-13 13:09:08 aNirBan
what is EOF?

Last edit: 2009-10-13 13:10:55
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.