Sherlock and Robberies
CodeChefOpen on judge ↗
Sherlock was becoming jobless. So he consulted Moriarty and asked him to plan bank robberies. But he requested him to commit the robberies in a pattern so that he could figure it out and help the police. This way he could regain his job. Moriarty being a good friend of Sherlock didn't want to disappoint him. So he committed a string of robberies in n banks numbered from a1 to an. Sherlock believe
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