Friendly Tournament (weights)

10 teams scored 343 points on this task, for a maximum score of 100, an average score of 34 and a median score of 21.

Highlights

  1. LS G.D. Cassini, Genova is the institute with the most points (100).
  2. Lombardia is the region with the most points (117).

Statement

The village of Krkva eventually decided to organize a football tournament. After aggressive advertisements, online campaigns, and various other promotions, they managed to lure N teams ready to fight for what could be their only piece of silverware for years to come. However, the mayor wants to have an unusual tournament and to make it as exciting as possible, they want to calculate certain indicators to further improve their analysis. Thus, the organizers initially assumed that the N teams have the same relative strength, which starts at 1. Then, as the tournament progresses, there will be Q events, given in chronological order, that are of one of two types: (1) 1 a b: Two teams with relative strengths a and b play against each other. The winner will have a relative strength equal to a + b from now on, while the loser is eliminated from the tournament (thus, one less team remains in the tournament)...