Question 1
Medium Connected Crop Arrangement: given an N x M garden grid and K crop types labeled 1 to K, where count[i] is the exact number of cells that must contain crop i, and sum(count) = N x M, construct any arrangement in which every cell has exactly one crop, crop i appears exactly count[i] times, and all cells of each crop form one connected region under up, down, left, and right adjacency. Input is N, M, and K, followed by the counts; output N rows of M integers. Example: input 2 3 3 with counts 2 1 3 has the valid output 1 1 2 / 3 3 3. Follow-up, Two Square Gardens: the field is an N x N garden and an M x M garden placed adjacent to each other, with sum(count) = N^2 + M^2, and the same connectivity rule applies.