src/problems/sset.lisp @ 72cd66a36853
Merge.
| author | Steve Losh <steve@stevelosh.com> | 
|---|---|
| date | Sun, 22 Dec 2019 13:21:30 -0500 | 
| parents | dbd7237ece35 | 
| children | 2735aa6aab79 | 
(in-package :rosalind) ;; The cardinality of a power set is 2ⁿ, because you can represent an individual ;; set as a binary string where 1 means the element is included and 0 is not, ;; and there are 2ⁿ possible binary strings of length n. (define-problem sset (data stream) "3" "8" (mod (expt 2 (read data)) 1000000)) #; Scratch -------------------------------------------------------------------- (problem-sset) (solve sset)