Инюшин Алексей 317 PokeMon 8471
Байдецкая Марина 319/2 PokeMon 9595
f1from collections import defaultdictf1from collections import defaultdict
n2deck_cards = defaultdict(set)n2slcard = defaultdict(set)
3player_decks = defaultdict(set)3slchel = defaultdict(set)
4while (line := input()):4while (strk := input()):
5    l1l2 = line.split(' / ')5    ij = strk.split(' / ')
6    if l1.isdigit():6    if i.isdigit():
7        deck_cards[l1].add(l2)7        slcard[i].add(j)
8    else:8    else:
t9        player_decks[l1].add(l2)t9        slchel[i].add(j)
10for p, cs in player_decks.items():10for chel, card in slchel.items():
11    player_decks[p] = len(set((card_name for c in cs for card_name in de11    slchel[chel] = len(set((card for ch in card for card in slcard[ch]))
>ck_cards[c])))>)
12maxvalue = max(player_decks.values())12Maxi = max(slchel.values())
13print(*sorted([x for x in player_decks if player_decks[x] == maxvalue]),13print(*sorted([card for card in slchel if slchel[card] == Maxi]), sep='\
> sep='\n')>n')
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op