ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1804. The Machinegunners in a Playoff

Main idea?
Posted by 72VanVector[SevNTU] 3 Nov 2010 05:15
Let's consider some cases:
1) the first part of the answer is a min number of goals needed to have a chance to advance next round. That means that the second team will score 0 goals in second game, and how many goals needed to be scored to complete the condition??
2) the second part - max number of goals to be scored in such case, that the opposite team still will have a change to win. That means we must suppose second team to have scored 30 goals in second round.

in each case we must calculate number of our scores to make the summarized scores equal for 2 rounds. But then we check the condition if the numbers of goals scored on the away fields of each team are equal - then the answer is OK, every team has a chance to advance. In first case we must take ++value of number if quantity of scored goals on away team is less (that means no chance), in second - value-- of number if quantity of scored goals on away team is greater(cause that leaves no chance for opposite team to win)

is that enough to solve??