Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
18
Task/ABC-Problem/TUSCRIPT/abc-problem.tu
Normal file
18
Task/ABC-Problem/TUSCRIPT/abc-problem.tu
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
set words = "A'BARK'BOOK'TREAT'COMMON'SQUAD'CONFUSE"
|
||||
set result = *
|
||||
loop word = words
|
||||
set blocks = "BO'XK'DQ'CP'NA'GT'RE'TG'QD'FS'JW'HU'VI'AN'OB'ER'FS'LY'PC'ZM"
|
||||
set wordx = split (word, |"~</~")
|
||||
set cond = "true"
|
||||
loop char = wordx
|
||||
set n = filter_index (blocks, "~*{char}*~", -)
|
||||
if (n.eq."") then
|
||||
set cond = "false"
|
||||
exit
|
||||
endif
|
||||
set n2 = select (n, 1)
|
||||
set n3 = select (blocks, #n2, blocks)
|
||||
endloop
|
||||
set out = concat (word, " ", cond)
|
||||
set result = append (result, out)
|
||||
endloop
|
||||
Loading…
Add table
Add a link
Reference in a new issue