Black-white Board Game
Both Fedya and Alex love playing games. One of their favorite games is playing with permutations. Description of game is given below. Initially, they have a N x N matrix with all cells being white. Before starting the game, Alex colors the matrix in following way. he chooses N pair of integer L[i], R[i] denoting that in the i-th row, columns from L[i] to R[i] (1 - based indexing) are colored bla
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