57. Place p Elements Randomly

Medium

Randomly place p = 3 ones in a 10×10 array of zeros, at p distinct positions chosen uniformly at random without replacement. Seed the global random state with 0 first for reproducibility.

Implement solve(...)