(def matrix (read-matrix "matrix.txt"))

;; find the six-digit modal string.

-;{{{ problem 85 -- number of rectangles~~ **~~

+;{{{ problem 85 -- number of rectangles

;; By counting carefully it can be seen that a rectangular grid

;; measuring 3 by 2 contains eighteen rectangles:

;; What is the sum of all the minimal product-sum numbers for 2 <= k <= 12000?

-;{{{ problem 89 -- roman numerals in minimal form~~ **~~

+;{{{ problem 89 -- roman numerals in minimal form

;; The rules for writing Roman numerals allow for many ways of writing

;; each number (see FAQ: Roman Numerals). However, there is always a

-;{{{ problem 90 -- two cubes to make a square~~ ***~~

+;{{{ problem 90 -- two cubes to make a square

;; Each of the six faces on a cube has a different digit (0 to 9)

;; written on it; the same is done to a second cube. By placing the

(= (count cube) 6) ; Here I need to check for a six, and if so add one with a nine

- (list cube (set (cons 9 cube))) ;It's not actually the correct cube, but it's close enough

+ (set (filter #(not= % 6) (cons 9 cube)))) ; This seems like it should be much simpler than it is

- (apply concat (for [x (range ~~9~~) :when (not (cube x))]

+ (apply concat (for [x (range 10) :when (not (cube x))]

(expound-cube (set (cons x cube)))))))

(defn expound-cubes [cubes]

;; :filter #(and (<= (count (first %)) 7)

;; (<= (count (frest %)) 7))

(generate-cubes must-create '(()) '(()))))

-;; "Elapsed time: 1478.547 msecs"

+;; "Elapsed time: 693.771 msecs"