MEENA AND RIVER
CodeChefOpen on judge ↗
There are n houses in a village named Lonere. A Corona pandemic broke out in the village and people are asked to not come out of their houses to avoid further spread. Meena is the head of this village. He suspects that some people might not follow his rules so he comes out with a plan. Meena decides to construct k rivers of infinite length such that any two houses are isolated from each other. Two
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