Jack and Boats
CodeChefOpen on judge ↗
PROBLEM DESCRIPTION Jack Sparrow wants to build a new empire of pirates. Thus, he decided to make N number of boats with distinct sizes. However, he is unsure about what size of wood would be fit to make the boats, thus he needs your help. Jack has Q queries(different sizes of woods), you are required to output how many boats will be possible to make using each query(particular batch of wood).
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