Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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, ls):
|
||||
if ls.isempty:
|
||||
return true
|
||||
for i in indices(list) where s[end] in list[i]:
|
||||
return abc(s[:end-1], remove!(copy(list), at: i))
|
||||
false
|
||||
|
||||
let test = ["A", "BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"]
|
||||
let ls = ["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