Picking Da Vinci successor
CodeChefOpen on judge ↗
Da Vinci is about to retire from the post of Prime Minister of the French King in a month. It is going to be very difficult for the King to find his replacement. The King is worried about the junior ministers as to how they will work without a leader. To instill in some values of team work among them, the King has asked all the N junior ministers to paint M walls together. The King feels that
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