Chips (chips)

220 teams scored 17625 points on this task, for a maximum score of 100, an average score of 80 and a median score of 100.

Highlights

  1. Galileo Galilei, Trento is the institute with the most points (900).
  2. Emilia-Romagna is the region with the most points (3505).

Statement

William is crazy about cosmic poker! In this game, coins of three colors (r, g, b) are used instead of cards. The game is simple, the casino defines two numbers A and C as coefficients for calculating bets, and the player's win is calculated with the formula: A * (r^2 + g^2 + b^2) + C * min {r, g, b} where r, g, b are the number of red, green and blue chips in the game. William is facing the following task: there are already r red, g green and b blue chips on the table, but with one last move, he can add on the table exactly one chip of any color. Help him choose a colour to maximize his win. Moreover, William wants to solve this problem for T different game configurations.