bob the builder
CodeChefOpen on judge ↗
The famous bob the builder has got a new contract. This time he has got a contract of connecting pipes. He wants to find out how much will it cost him to connect all given pipes and that too at minimum cost for each connection. As he is not so good in mathematics so he wants your help in calculating the cost of each connection. The rules for joining the pipes are that he can only join two pipes a
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