to be all interval | att vara all interval (diff)
- be the to question not to that's or be | diff: det är frågan vara att vara inte eller
- be question to that's to not the or be | diff: är frågan det vara att inte vara eller
- be that's to question be to or the not | diff: att det frågan är eller vara vara inte
- be that's be to or question to the not | diff: att vara eller vara det frågan är inte
- not to be that's or question to the be | diff: att eller vara inte det frågan är vara
- not to be question to that's or the be | diff: att eller är frågan det inte vara vara
- be to or question to the not that's be | diff: att vara det frågan är inte eller vara
- to not be question to the be that's or | diff: att vara eller frågan är det vara inte
- to not that's to question be be the or | diff: att eller det frågan är inte vara vara
- be to or that's not question to the be | diff: att vara inte eller vara frågan är det
- be that's or to be the to question not | diff: att inte vara eller det är frågan vara
- not to or that's be the to question be | diff: att vara inte vara det är frågan eller
- be to or the not that's to question be | diff: att vara vara inte eller det frågan är
- to be not that's or the be question to | diff: att vara eller inte vara det är frågan
- to not that's be be the to question or | diff: att eller vara inte vara är frågan det
- or be be the to question not to that's | diff: eller inte det är frågan vara att vara
- or that's be the to question be not to | diff: inte vara det är frågan eller vara att
- or the be question to to be not that's | diff: vara det är frågan inte att vara eller
- be question to that's or the to not be | diff: är frågan det inte vara eller att vara
- or question to the be be that's not to | diff: det frågan är vara inte vara eller att
- be the to question not that's or to be | diff: det är frågan vara eller inte vara att
- be question to that's not the or to be | diff: är frågan det eller inte vara vara att
- or be to question be the not to that's | diff: eller vara frågan är det inte att vara
- not be question to that's or the to be | diff: vara är frågan det inte vara eller att
- not be that's or question to the to be | diff: vara vara inte det frågan är eller att
- not to question be the or that's to be | diff: eller frågan är det vara inte vara att
- be question to that's or the to be not | diff: är frågan det inte vara eller att vara
- not question to the be to or that's be | diff: vara frågan är det eller vara inte att
- not the or to be question to that's be | diff: inte vara vara eller är frågan det att
- not the to question or to be that's be | diff: inte är frågan det vara eller vara att
- not the to question or be to that's be | diff: inte är frågan det eller att vara vara
- be or question to the not to that's be | diff: eller det frågan är inte att vara vara
- to be the to question not be that's or | diff: eller det är frågan vara vara att inte
- be question to that's to be or the not | diff: är frågan det vara att eller vara inte
- be or that's to not question to the be | diff: eller inte vara att vara frågan är det
- that's to question be to be not the or | diff: det frågan är eller att vara inte vara
- that's to question be be not or the to | diff: det frågan är inte vara att vara eller
- that's to question be be not to the or | diff: det frågan är inte vara att eller vara
- to be question to that's be not the or | diff: eller är frågan det att vara inte vara
- be or the not to that's to question be | diff: eller vara inte att vara det frågan är
- to be that's be not the to question or | diff: eller vara att vara inte är frågan det
- not the or be to that's to question be | diff: inte vara eller att vara det frågan är
MiniZinc model
include "globals.mzn";
int: n = 9;
array[1..n] of string: s = ["to", "be", "or", "not", "to", "be", "that's", "the", "question"];
array[1..n-1] of string: s2 = ["att", "vara", "eller", "inte", "vara", "det", "är", "frågan"];
array[1..n] of var 1..n: x;
array[1..n-1] of var 1..n-1: diffs;
int: sum_distinct = ((n+1)*n) div 2;
solve satisfy;
constraint
all_different(diffs)
/\
all_different(x)
/\
forall(k in 1..n-1) (
diffs[k] = abs(x[k+1] - x[k])
)
/\
x[1] < x[n-1]
/\
diffs[1] < diffs[2]
;
output
[
if i = 1 then "<li> " else "" endif ++
show(s[fix(x[i])]) ++ " "
| i in 1..n
] ++
[
if i = 1 then " | diff: " else "" endif ++
show(s2[fix(diffs[i])]) ++ " "
| i in 1..n-1
];
Back to Constrained-based constraint poetry
Created by Hakan Kjellerstrand hakank@gmail.com