Jack Sparrow and his bag of jewellery
CodeChefOpen on judge ↗
Problem Description : There are 100 houses located on a straight line. The first house is numbered 1 and the last one is numbered 100. Some M houses out of these 100 are occupied by cops. Jack has just stolen the bag of King of England and is looking for a house to hide in. King's men uses fast 4G Internet and sends the message to all the cops that a pirate named Jack has just stolen a bag and
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