Medium30 pts
Organizing Containers of Balls
n containers, n types. M[i][j]=count of type j in container i. Can we swap (any amount) so each container holds only one type? Possible/Impossible.
Input
q; each: n, then n x n matrix.
Output
Possible or Impossible per test.
Sample
2 2 1 1 1 1 2 0 2 1 1
Expected
Possible Impossible
Loading editor…
Output
No output yet. Run your code to see results.