src/problems/sset.lisp @ e3aefcbf364c
Cache Uniprot results on the filesystem
This will make only the first `(run-tests)` on a given computer take forever,
instead of the first `(run-tests)` of a given Lisp session. It will also
hopefully make the Uniprot folks not hate me.
author |
Steve Losh <steve@stevelosh.com> |
date |
Fri, 24 Jan 2020 23:05:16 -0500 |
parents |
2735aa6aab79 |
children |
(none) |
(defpackage :rosalind/sset (:use :cl :rosalind :losh :iterate))
(in-package :rosalind/sset)
;; 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 --------------------------------------------------------------------