A Programming Duel
CodeChefOpen on judge ↗
Recently, Hogwarts School of Witchcraft and Wizardry has introduced a course on coumputer programming! As a result, many programming duels now take place in Hogwarts. Lucius Malfoy has challenged Harry Potter to one such programming duel. The rules of the duel are as follows: 1) Malfoy chooses two integers N(>0) and K(>=0) and a sequence S of N positive integers. 2) Harry must find the number o
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.
Sign in to chat with the tutor and save your progress.
Sign in to start