Board Game (marcel)

42 teams scored 2255 points on this task, for a maximum score of 100, an average score of 54 and a median score of 55.

Highlights

  1. ITST Kennedy, Pordenone is the institute with the most points (155).
  2. Veneto is the region with the most points (455).

Statement

Marcel's son is eager to try out the new board game he just received for Christmas! The initial setup is a simple square grid of N × N cards. Every card has an associated value, which can be either positive or negative. At each step of the game, you can perform one of these five actions: (1) collect all the cards from the first row; (2) collect all the cards from the last row; (3) collect all the cards from the first column; (4) collect all the cards from the last column; (5) terminate the match. When the cards are collected, they are effectively removed from the grid and the game goes on without them. However, you are only allowed to collect cards if the sum of their values is at least X. Should none of the first four actions be allowed, you are forced to terminate the game (which is the only action you can always do). Marcel wonders whether his son will enjoy many different matches or he will bore immediately. Help him: how many different matches can be played?