19 lines
523 B
Text
19 lines
523 B
Text
enum Baker, Cooper, Fletcher, Miller, Smith
|
|
constant names={"Baker","Cooper","Fletcher","Miller","Smith"}
|
|
|
|
procedure test(sequence flats)
|
|
if flats[Baker]!=5
|
|
and flats[Cooper]!=1
|
|
and not find(flats[Fletcher],{1,5})
|
|
and flats[Miller]>flats[Cooper]
|
|
and abs(flats[Smith]-flats[Fletcher])!=1
|
|
and abs(flats[Fletcher]-flats[Cooper])!=1 then
|
|
for i=1 to 5 do
|
|
?{names[i],flats[i]}
|
|
end for
|
|
end if
|
|
end procedure
|
|
|
|
for i=1 to factorial(5) do
|
|
test(permute(i,tagset(5)))
|
|
end for
|