Making each row’s cells differ leaves the columns free to repeat. Adding the same check per column still isn’t grid-unique: two cells that share neither a row nor a column, such as the ends of a diagonal, are never compared. The only sure way is to compare every pair of cells.
unique{} isn’t used on purpose: on the current toolchain, unique{} over a row of a 2D array crashes the compiler. Pairwise != works.
Fix the class below.
Requirements
No array-reduction methods (sum() with, find() with): plain expressions and index-based foreach only.
One working answer: brokenbench's own fix for this exercise. Try a few runs first.
What changes, against the code you started with:
docker run --pull always --rm -p 127.0.0.1:8787:8787 ghcr.io/adibis/brokenbench-runnerLooking for a runner on this computer…
The first start downloads about 250 MB; after that it starts in seconds and only downloads again when there's an update. Your code goes to the runner on your computer, not to chipdv.io.