tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,11 @@
|
|||
procedure main()
|
||||
write( if list_llt([1,2,1,3,2],[1,2,0,4,4,0,0,0]) then "true" else "false" )
|
||||
end
|
||||
|
||||
|
||||
procedure list_llt(L1,L2) #: returns L2 if L1 lexically lt L2 or fails
|
||||
every i := 1 to min(*L1,*L2) do
|
||||
if L1[i] << L2[i] then return L2
|
||||
else if L1[i] >> L2[i] then fail
|
||||
if *L1 < *L2 then return L2
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue