Dinesman's multiple-dwelling problem: Difference between revisions
Content added Content deleted
m (→{{header|Quackery}}: tweaked text, removed superfluous code) |
(→{{header|Quackery}}: improved) |
||
Line 3,911: | Line 3,911: | ||
fletcher cooper adjacent exclude</pre> |
fletcher cooper adjacent exclude</pre> |
||
is a restatement of the conditions of the problem (1) with noise words removed, (2) in postfix notation, and (3) recast as imperative rather than declarative. |
|||
::* Baker does not live on the top floor. |
::* Baker does not live on the top floor. |
||
Line 3,923: | Line 3,923: | ||
<code>permutations</code> is defined at [[Permutations#Quackery]]. |
<code>permutations</code> is defined at [[Permutations#Quackery]]. |
||
<syntaxhighlight lang="Quackery"> [ |
<syntaxhighlight lang="Quackery"> [ stack ] is problem ( --> s ) |
||
[ temp share 0 peek ] is baker ( --> n ) |
|||
[ temp share 1 peek ] is cooper ( --> n ) |
[ temp share 1 peek ] is cooper ( --> n ) |
||
[ temp share 2 peek ] is fletcher ( --> n ) |
[ temp share 2 peek ] is fletcher ( --> n ) |
||
Line 3,938: | Line 3,940: | ||
[ temp share nested join ] is include ( [ --> [ ) |
[ temp share nested join ] is include ( [ --> [ ) |
||
⚫ | |||
⚫ | |||
problem put |
|||
⚫ | |||
⚫ | |||
⚫ | |||
[ |
' [ 1 2 3 4 5 ] |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
[ temp put |
|||
problem share do |
|||
temp release ] |
|||
⚫ | |||
⚫ | |||
say " B C F M S" cr |
|||
⚫ | |||
⚫ | |||
⚫ | |||
solve |
|||
say " B C F M S" cr |
|||
⚫ | |||
⚫ | |||
⚫ | |||
fletcher top |
|||
fletcher bottom or exclude |
|||
miller cooper higher require |
|||
⚫ | |||
fletcher cooper adjacent exclude ]</syntaxhighlight> |
|||
{{out}} |
{{out}} |