N Islands!!
CodeChefOpen on judge ↗
The chef is playing a board game in chef island. The dimension of the board is $N$ x $N$ Numbers written on the principal diagonal of the matrix is a permutation of (1, 2, 3, .... $N$). The problem is to divide the cells under the diagonal into $N$ connected components such that the following conditions are satisfied. - Every Region should be connected. - The $x_{th}$ region should contain the cel
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