Hydroelectric Power
CodeChefOpen on judge ↗
High up in the hills, where the Cooum begins its journey to the plains, an elaborate network of canals has been built to tap the power of this mighty river. The network begins as a set of canals leading off from the river. Lower down, each of these canals splits into multiple subcanals. Similarly, each subcanal splits into multiple smaller channels, and so on. Wherever a canal splits, including th
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