Increasing XOR (increasingxor)

9 teams scored 476 points on this task, for a maximum score of 100, an average score of 53 and a median score of 45.

Highlights

  1. U. Dini, Pisa is the institute with the most points (100).
  2. Lombardia is the region with the most points (211).

Statement

An array B consisting of k positive integers is beautiful if and only if there exists an array C = [C_0, C_1, …, C_k-1] such that C is a permutation of B and the sequence of its prefix-XORs is strictly increasing. That is, P_0 < P_1 < … < P_k-1 where P_i = C_0 \oplus C_1 \oplus … C_i for each i = 0, …, k-1. Given an array A consisting of N positive integers, you have to determine for each non-empty prefix of A whether it is beautiful.