16 lines
508 B
Text
16 lines
508 B
Text
% ...
|
|
PermsSorted = Perms.sort(),
|
|
P1Sorted = P1.sort(),
|
|
Found2 = false,
|
|
foreach({P,PP} in zip(PermsSorted,P1Sorted ++ ["DUMMY"]), Found2 = false)
|
|
if P != PP then
|
|
println(missing8=P),
|
|
Found2 := true
|
|
end
|
|
end,
|
|
|
|
A = [cond(P == PP,1,0) : {P,PP} in zip(PermsSorted,P1Sorted ++ ["DUMMY"])],
|
|
println(missing9=[PermsSorted[I] : I in 1..PermsSorted.length, A[I] = 0].first()),
|
|
|
|
% shorter
|
|
println(missing10=[P:{P,PP} in zip(PermsSorted,P1Sorted ++ ["DUMMY"]), P != PP].first()),
|