Subset Fight (subsetfight)

7 teams scored 600 points on this task, for a maximum score of 100, an average score of 86 and a median score of 80.

Highlights

  1. Volta, Milano is the institute with the most points (100).
  2. Emilia-Romagna is the region with the most points (180).

Statement

Marco is playing a game using a deck of cards. The deck consists of K different types of cards. For each type i = 1 … K there are V_i cards of that type, which are distinguishable by their seed, but they all share the same value i. Notice the total number of cards in the deck is N = V_1 + V_2 + … + V_K. For example, let's say that K = 3 and V = [1, 2, 3]. This means that the values of the cards in the deck are as follows: 1, 2, 2, 3, 3, 3 Marco must choose anyone of the possible 2^N subsets of cards, including the empty subset with zero cards. If the sum of the values in the subset is a multiple of K, Marco wins! In the example above, there are 24 different ways of choosing a winning subset of cards. Since the game is quite easy, Marco is now wondering: how many ways are there to win the game?