2002 LSU Computer Science High School Programming Contest

Sponsored by Microsoft

Veteran - Problem 2

 MAIN
  Home
  Schedule
  Registration
  Rules
  About
  Language
  Prizes
  
 RESULTS
  Problem Set
  Judge Data
  Solutions
  
 LINKS
  LSU
  Computer Science
  Contest Index
  HS 2001
  HS 2000
  ACM Intl PC
  PC2
 

Football Folly

Sam doesn't mind football too much, but he much prefers playing video game versions of the sport than actually participating in physical labour. While playing a particular game from his frighteningly extensive collection, his Louisiana Coronets have fallen behind the Florida Minestrones. Desperate, he tries to figure out the fewest number of scoring plays he can pull off to win the game by a point--a slacker all the way.

Description:

You are to determine the smallest number of scoring plays that the Coronets can make to win by exactly one point, given the current scores for both the Coronets and the Minestrones.

Much like Super Vinnie, the football games of 2030 are decidedly less complex than our 'ancient' implementations. The only methods of scoring are:

  • 6 points for a touchdown, after which one must score either
    • 1 point for an extra point; or
    • 2 points for a conversion.
  • 3 points for a field goal.

You can assume that it will be possible to win by one point given the scoring method above. The game is not in the middle of a play (such as between a touchdown and the resulting extra point or conversion) when the simulation is started.

Input:

The first piece of data in the file is the number of simulations to run, represented by a non-negative integer. For each simulation, there are two lines of data, each with a single non-negative integer. The first line is the Minestrones' score; the second line is the Coronets' score.

Output:

For each simulation, print

	Simulation x:
	The Coronets are down by n points.
	The minimum number of times that they need to score is t.
where x is the simulation number, starting from 1, n is the number of points that the Coronets are down by, and t is the minimum number of times that they need to score to win by exactly one point.

Sample Input:

2		Number of simulations
37		Minestrones' score in the first simulation
28		Coronets' score in the first simulation
40		Minestrones' score in the second simulation
28		Coronets' score in the second simulation

Sample Output:

Simulation 1:
The Coronets are down by 9 points.
The minimum number of times that they need to score is 2.
Simulation 2:
The Coronets are down by 12 points.
The minimum number of times that they need to score is 3.



Return to Problem Index



 

The statements and opinions included in these pages are those of 2002 LSU Computer Science High School Programming Contest only. Any statements and opinions included in these pages are not those of Louisiana State University or the LSU Board of Supervisors.
Site maintained by: Isaac Traxler
© 2000,2001,2002    Last modified: Saturday, 26 February, 2005 14:40:39