September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
12
Task/ABC-Problem/Astro/abc-problem.astro
Normal file
12
Task/ABC-Problem/Astro/abc-problem.astro
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
fun abc(s, list):
|
||||
return true if s.empty
|
||||
for i in [:list.size]:
|
||||
return any([abc(s[:!1], delete(val list, i))]) ...
|
||||
if s[!0] in list[i] else true
|
||||
false
|
||||
|
||||
let test = ["A", "BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"]
|
||||
let list = ["BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS","JW",
|
||||
"HU","VI","AN","OB","ER","FS","LY","PC","ZM"]
|
||||
for s in test:
|
||||
print "$:.-8(s) | $(abc(s, list))"
|
||||
Loading…
Add table
Add a link
Reference in a new issue