Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
16
Task/ABC-Problem/EchoLisp/abc-problem.echolisp
Normal file
16
Task/ABC-Problem/EchoLisp/abc-problem.echolisp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
(lib 'list) ;; list-delete
|
||||
|
||||
(define BLOCKS '("BO" "XK" "DQ" "CP" "NA" "GT" "RE" "TG" "QD" "FS"
|
||||
"JW" "HU" "VI" "AN" "OB" "ER" "FS" "LY" "PC" "ZM" ))
|
||||
|
||||
(define WORDS '("A" "BARK" "BOOK" "TREAT" "COMMON" "SQUAD" "CONFUSE"))
|
||||
|
||||
(define (spell word blocks)
|
||||
(cond
|
||||
((string-empty? word) #t)
|
||||
((empty? blocks) #f)
|
||||
(else
|
||||
(for/or [(block blocks)]
|
||||
#:continue (not (string-match block (string-first word)))
|
||||
(spell (string-rest word) (list-delete blocks block))))))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue