Confusing Usernames (usernames)

155 teams scored 2675 points on this task, for a maximum score of 90, an average score of 17 and a median score of 5.

Highlights

  1. I.S. Fermi MN, Mantova is the institute with the most points (195).
  2. Lombardia is the region with the most points (610).

Statement

William spends most of his time administering the Italian portal for the IOI training. During his last sleepless night debugging the system, he figured out that several of the usernames used in the website are very similar. This causes a lot of confusion, especially when inspecting users' rankings. He is then considering to add a new rule to the website: you are not allowed to select a username whose set of letters is a subset of the set of letters of another username. For example, you cannot register the username bob00 if n0ob is already present. In order to evaluate the impact of such a design choice, he now wants to measure how much this rule is violated by the current list of usernames. More precisely, given a list of N usernames U_i consisting of characters `a' -- `z' and `0' -- `9', he wants to count the number of username pairs (i,j) such that letters(U_i) ⊆ letters(U_j).