Fatal Error · Extreme CodeFree
Who Keeps Stealing It?
The birds keep stealing each other's choruses. For each question k, find the longest tune that at least k different birds sing somewhere in their songs, and where one of them sings it.
For every k asked, give the longest tune shared by at least k birds, and one place it is sung.
Every line must be right: the longest length, and a real place with enough singers.
D. Next D lines: recordings 1 to D, capital letters A–Z.Q, then Q lines with one k each.Q lines: len r p, a longest tune of len notes sung by at least k birds, found in recording r from note p (from 1); or 0.Q ≤ 20 000; 1 ≤ k ≤ D5 TRILALAQ LALALALA OLALAKI LALAZOOM PIPI 5 1 2 3 4 5
8 1 1 4 2 1 4 1 4 4 4 1 0
Sign in to play. It is free.
Sign in