Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
21
Task/ABC-problem/SETL/abc-problem.setl
Normal file
21
Task/ABC-problem/SETL/abc-problem.setl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
program ABC_problem;
|
||||
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"];
|
||||
|
||||
loop for word in words do
|
||||
print(rpad(word, 8), can_make_word(word, blocks));
|
||||
end loop;
|
||||
|
||||
proc can_make_word(word, blocks);
|
||||
loop for letter in word do
|
||||
if exists block = blocks(i) | to_upper(letter) in block then
|
||||
blocks(i) := "";
|
||||
else
|
||||
return false;
|
||||
end if;
|
||||
end loop;
|
||||
return true;
|
||||
end proc;
|
||||
end program;
|
||||
Loading…
Add table
Add a link
Reference in a new issue