Faulty Keyboard
CodeChefOpen on judge ↗
Jeff bought himself a mechanical keyboard from an online retailer. Little did he know that the keyboard he received had major flaws in it. These flaws can be best described in the given two points: - A pressed key is not detected if it is being pressed for the first time. - The above condition resets for every $5^{th}$ character entered by Jeff. To explain the flaws better, we can take a look at
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