← All problemsSign in

Quidditch

Godric Gryffindor started playing the new online game called "Quidditch". However, they always plays with Salazar Slytherin players, and they all have the same name: ”Magician" (the most common name in Hogwarts). In each game, Godric Gryffindor plays with n other players. Since they all have the same name, they are numbered from 1 to n. The players write m comments in the chat. A comment has the s

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start