Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/ABC-problem/Transd/abc-problem.transd
Normal file
25
Task/ABC-problem/Transd/abc-problem.transd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#lang transd
|
||||
|
||||
MainModule: {
|
||||
blocks: ["BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS",
|
||||
"JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"],
|
||||
words: ["A","BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"],
|
||||
|
||||
testMake: Lambda<String Vector<String> Bool>(λ
|
||||
w String() v Vector<String>()
|
||||
locals: c (toupper (subn w 0))
|
||||
(for bl in v do
|
||||
(if (contains bl c)
|
||||
(if (== (size w) 1) (ret true))
|
||||
(if (exec testMake (sub w 1) (erase (cp v) @idx))
|
||||
(ret true)))
|
||||
)
|
||||
(ret false)
|
||||
),
|
||||
_start: (lambda
|
||||
(for word in words do
|
||||
(lout :boolalpha word " : "
|
||||
(exec testMake word blocks))
|
||||
)
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue