[Jprogramming] Distinct Numbers in Rows and Columns
Marshall Lochbaum
mlochbaum at raleighcharterhs.org
Tue Oct 5 07:11:58 HKT 2010
r=. *./"1@:(-: ~.)"1
(r *. r@:(0 2 1&|:)) q
At a glance...
More of a baseline than a solution, I'd say.
Marshall
-----Original Message-----
From: programming-bounces at jsoftware.com
[mailto:programming-bounces at jsoftware.com] On Behalf Of Roger Hui
Sent: Monday, October 04, 2010 6:41 PM
To: Programming forum
Subject: [Jprogramming] Distinct Numbers in Rows and Columns
An interesting puzzle arising from the KenKen solver:
q is an array with shape (m,n,n) and (,q) e. 1+i.n .
Which items of q have 1+i.n in each row and in each column?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list