Editorial for WC '17 Contest 1 J3 - Stanley
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Let be the number of games won by Team , and be the number of games won by Team . We can initialize both of these values to and then process the games in the series one by one. For each game , we can input its and values, and then either increment if , or increment otherwise (if ). Once either or , we should stop processing games and output the current values of and .
Comments