← All problemsSign in

Lockpicking Chef

CodeChefRating 1311Open on judge ↗

Chef bought a new digital lock, but is quite suspicious of its actual strength in keeping out pesky thieves. So, he wants to find out how quickly he can open the lock. The digital lock works as follows: - On its screen, there is a string of digits $S$ of length $N$. - There is also a secret code $K$ of length $M$ ($1 \leq M \leq 10$), which acts as the key to the lock. The lock will open if $K$

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