- SL[X_] := Piecewise[{ {Reverse[Transpose[Reverse[X]]], First[Diagonal[X]] > Last[Diagonal[X]]}, {X, First[Diagonal[X]] < Last[Diagonal[X]]}, {Piecewise[{ {Reverse[Transpose[Reverse[X]]], First[Diagonal[X, 1]] > Last[Diagonal[X, 1]]}, {X, First[Diagonal[X, 1]] <= Last[Diagonal[X, 1]]}}], First[Diagonal[X]] == Last[Diagonal[X]]} }]Llst = {{{1, 1, 1}, {1, 4, 1}, {1, 1, 4}}, {{1, 1, 1}, {1, 4, 4}, {1, 4, 16}}, {{1, 1, 1}, {1, 9, 1}, {1, 1, 9}}, {{1, 1, 1}, {1, 9, 25}, {1, 25, 81}}, {{1, 1, 1}, {1, 16, 4}, {1, 4, 4}}, {{1, 1, 1}, {1, 81, 25}, {1, 25, 9}}, {{1, 1, 4}, {1, 9, 16}, {4, 16, 36}}, {{1, 4, 1}, {4, 36, 16}, {1, 16, 9}}, {{1, 4, 4}, {4, 1, 4}, {4, 4, 1}}, {{1, 4, 4}, {4, 1, 4}, {4, 4, 4}}, {{1, 4, 4}, {4, 4, 4}, {4, 4, 1}}, {{1, 4, 4}, {4, 9, 16}, {4, 16, 9}}, {{1, 4, 4}, {4, 25, 4}, {4, 4, 36}}, {{1, 4, 4}, {4, 25, 16}, {4, 16, 25}}, {{1, 4, 4}, {4, 36, 4}, {4, 4, 25}}, {{1, 9, 9}, {9, 1, 9}, {9, 9, 16}}, {{1, 9, 9}, {9, 16, 9}, {9, 9, 1}}, {{1, 9, 9}, {9, 16, 49}, {9, 49, 64}}, {{1, 9, 9}, {9, 64, 49}, {9, 49, 16}}, {{4, 1, 1}, {1, 1, 1}, {1, 1, 4}}, {{4, 1, 1}, {1, 4, 1}, {1, 1, 1}}, {{4, 1, 4}, {1, 1, 1}, {4, 1, 16}}, {{4, 1, 4}, {1, 49, 25}, {4, 25, 16}}, {{4, 4, 1}, {4, 16, 1}, {1, 1, 1}}, {{4, 4, 1}, {4, 16, 25}, {1, 25, 49}}, {{4, 4, 4}, {4, 1, 4}, {4, 4, 1}}, {{4, 4, 4}, {4, 9, 1}, {4, 1, 9}}, {{4, 4, 4}, {4, 9, 16}, {4, 16, 36}}, {{4, 4, 4}, {4, 36, 16}, {4, 16, 9}}, {{4, 4, 16}, {4, 9, 25}, {16, 25, 81}}, {{4, 9, 9}, {9, 4, 36}, {9, 36, 4}}, {{4, 9, 36}, {9, 4, 9}, {36, 9, 4}}, {{4, 16, 4}, {16, 81, 25}, {4, 25, 9}}, {{4, 36, 9}, {36, 4, 9}, {9, 9, 4}}, {{9, 1, 1}, {1, 1, 1}, {1, 1, 9}}, {{9, 1, 1}, {1, 9, 1}, {1, 1, 1}}, {{9, 1, 4}, {1, 9, 4}, {4, 4, 4}}, {{9, 1, 16}, {1, 1, 4}, {16, 4, 36}}, {{9, 1, 25}, {1, 1, 1}, {25, 1, 81}}, {{9, 4, 1}, {4, 4, 4}, {1, 4, 9}}, {{9, 4, 16}, {4, 1, 4}, {16, 4, 9}}, {{9, 4, 16}, {4, 4, 4}, {16, 4, 36}}, {{9, 4, 25}, {4, 4, 16}, {25, 16, 81}}, {{9, 16, 1}, {16, 36, 4}, {1, 4, 1}}, {{9, 16, 4}, {16, 9, 4}, {4, 4, 1}}, {{9, 16, 4}, {16, 36, 4}, {4, 4, 4}}, {{9, 16, 16}, {16, 36, 16}, {16, 16, 49}}, {{9, 16, 16}, {16, 49, 16}, {16, 16, 36}}, {{9, 25, 1}, {25, 81, 1}, {1, 1, 1}}, {{9, 25, 4}, {25, 81, 16}, {4, 16, 4}}, {{16, 1, 4}, {1, 1, 1}, {4, 1, 4}}, {{16, 4, 1}, {4, 4, 1}, {1, 1, 1}}, {{16, 4, 25}, {4, 4, 1}, {25, 1, 49}}, {{16, 9, 9}, {9, 1, 9}, {9, 9, 1}}, {{16, 9, 49}, {9, 1, 9}, {49, 9, 64}}, {{16, 25, 4}, {25, 49, 1}, {4, 1, 4}}, {{16, 49, 9}, {49, 64, 9}, {9, 9, 1}}, {{25, 4, 4}, {4, 1, 4}, {4, 4, 36}}, {{25, 4, 4}, {4, 36, 4}, {4, 4, 1}}, {{25, 4, 16}, {4, 1, 4}, {16, 4, 25}}, {{25, 16, 4}, {16, 25, 4}, {4, 4, 1}}, {{36, 4, 4}, {4, 1, 4}, {4, 4, 25}}, {{36, 4, 4}, {4, 25, 4}, {4, 4, 1}}, {{36, 4, 16}, {4, 1, 1}, {16, 1, 9}}, {{36, 4, 16}, {4, 4, 4}, {16, 4, 9}}, {{36, 16, 4}, {16, 9, 1}, {4, 1, 1}}, {{36, 16, 4}, {16, 9, 4}, {4, 4, 4}}, {{36, 16, 16}, {16, 9, 16}, {16, 16, 49}}, {{36, 16, 16}, {16, 49, 16}, {16, 16, 9}}, {{49, 1, 25}, {1, 4, 4}, {25, 4, 16}}, {{49, 16, 16}, {16, 9, 16}, {16, 16, 36}}, {{49, 16, 16}, {16, 36, 16}, {16, 16, 9}}, {{49, 25, 1}, {25, 16, 4}, {1, 4, 4}}, {{64, 9, 49}, {9, 1, 9}, {49, 9, 16}}, {{64, 49, 9}, {49, 16, 9}, {9, 9, 1}}, {{81, 1, 25}, {1, 1, 1}, {25, 1, 9}}, {{81, 16, 25}, {16, 4, 4}, {25, 4, 9}}, {{81, 25, 1}, {25, 9, 1}, {1, 1, 1}}, {{81, 25, 16}, {25, 9, 4}, {16, 4, 4}}};MatrixForm /@ Llst;MatrixForm /@ SL /@ DeleteDuplicatesBy[Llst, SL[#] &]
复制代码 |