Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,21 @@
function check_brackets(sequence s)
integer level = 0
for i=1 to length(s) do
switch s[i]
case '[': level += 1
case ']': level -= 1
if level<0 then exit end if
end switch
end for
return (level=0)
end function
sequence s
constant ok = {"not ok","ok"}
for i=1 to 10 do
for j=1 to 2 do
s = shuffle(join(repeat("[]",i-1),""))
printf(1,"%s %s\n",{s,ok[check_brackets(s)+1]})
end for
end for