8 teams scored 254 points on this task, for a maximum score of 63, an average score of 32 and a median score of 21.
Three good friends -- Albert, Botond, and Csaba -- share two passions: they all love \soutvisiting night clubs reading books and spending time together. Over the years, they have visited nearly every \soutnight club library in the city and \souttried all the available cocktails read all the available books there. The city has N libraries, numbered from 0 to N - 1, connected by N - 1 bidirectional roads. Each road connects two libraries, U_i and V_i, with a length of W_i. It is possible to travel between any two libraries by following some sequence of roads. Let d(u, v) represent the distance between libraries u and v, defined as the sum of road lengths along the shortest path connecting them. Each friend has a set of favorite libraries, which is a nonempty subset of all libraries: (1) Albert has P favourite libraries: A_0, …, A_P-1. (2) Botond has Q favourite libraries: B_0, …, B_Q-1. (3) Csaba has R favourite libraries: C_0, …, C_R-1...