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
24
Task/ABC-Problem/Ring/abc-problem.ring
Normal file
24
Task/ABC-Problem/Ring/abc-problem.ring
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
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 ]
|
||||
|
||||
for x in words
|
||||
see '>>> can_make_word("' + upper(x) + '")' + nl
|
||||
if checkword(x,blocks) see "True" + nl
|
||||
else see "False" + nl
|
||||
ok
|
||||
next
|
||||
|
||||
func CheckWord Word,Blocks
|
||||
cBlocks = BLocks
|
||||
for x in word
|
||||
Found = false
|
||||
for y = 1 to len(cblocks)
|
||||
if x = cblocks[y][1] or x = cblocks[y][2]
|
||||
cblocks[y] = "--"
|
||||
found = true
|
||||
exit
|
||||
ok
|
||||
next
|
||||
if found = false return false ok
|
||||
next
|
||||
return true
|
||||
Loading…
Add table
Add a link
Reference in a new issue