23 teams scored 800 points on this task, for a maximum score of 65, an average score of 35 and a median score of 35.
Edoardo has been hired by the Inland Revenue Agency with the task of detecting fraudulent tax forms. After months of thorough analysis, he has finally found a measure of fraudulence! You are given a tax form, represented as an array of N elements V_i for i= 0 … N-1. The fraudulence of the sub-array [V_i, … V_j] (for 0 < i < j < N-1) is defined as the product of the frequency of the rarest element (the smallest number of times an element appears in the sub-array) with the frequency of the most common element (the highest number of times an element appears in the sub-array). For example, [ 1,3,2,3,1,2,3 ] has fraudulence 6 = 2 × 3 since the rarest elements (1 and 2) appear twice, while the most common element (3) appears 3 times. Compute the maximum fraudulence for a sub-array of the given array!