表 排序 分级
本帖最后由 kblh 于 2015-5-17 22:38 编辑("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
("11" "12" "13" "14" "15" "16") ("12" "13") ("12" "13" "14" "15""16")
("16") ("2") ("2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
("2" "3") ("4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
("4" "5") ("5") ("6") ("6" "7" "8" "9" "10") ("7" "8") ("8" "12") ("9")("1")
("14") ("14" "15") ("10") ("11")
表比较得到
("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")1
("1")2
("2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")2
("2" "3")3
("4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16") 3
("8" "12") 4 ("2")4 ("4" "5")4("6" "7" "8" "9" "10") 4
("11" "12" "13" "14" "15" "16")4
("5") 5 ("6")5("10")5 ("9") 5 ("11")5
("7" "8")5("12" "13" "14" "15""16")5
("16")6("12" "13") 6 ("14" "15")6("14") 7
数字表示级别 本帖最后由 kblh 于 2015-5-17 15:55 编辑
(defun xxj ( / )
(setq tth (xxh) tti (xxi) ttc (xxc)oba '()obb '())
(setq ls (del-same tth)lt (del-same tti) lc (del-same ttc) i 0 xs'())
(repeat (length ls)
(setq aa (nth i ls))
(setq bb (cdr aa)cc (remove bb lt) k 0)
(if (=(length lc)(car aa))
(setq oa (list (cons 1 bb)) oba (append oa oba))
)
(while (< k (length cc))
(setq dd (nth k cc))
(if (<(length bb)(length dd))
(progn
(setq ob'()oc'()od'()oe'())
(foreach xbb(setq dd (vl-remove x dd)))
(if dd
(progn
(setq ob (list(cons((length dd) bb))) oc (append ob oc) od (l_ssort oc 0 '>))
)
)
(if od (setq oe od)(setq oe oc))
)
)
(setq k (+ k 1))
)
(setq oba (append oe oba))
(setq i (+ i 1))
)
oba
)不行
本帖最后由 llsheng_73 于 2015-5-28 16:13 编辑
(defun xxj(a)
(vl-sort(mapcar'(lambda(x)(list x(length(vl-remove'nil(mapcar'(lambda(y)(apply'and(mapcar'(lambda(z)(member z y))x)))a)))))a)'(lambda(x y)(<(last x)(last y))))
)
(xxj'(("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
("11" "12" "13" "14" "15" "16") ("12" "13") ("12" "13" "14" "15""16")
("16") ("2") ("2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
("2" "3") ("4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
("4" "5") ("5") ("6") ("6" "7" "8" "9" "10") ("7" "8") ("8" "12") ("9")("1")
("14") ("14" "15") ("10") ("11")))
((("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16") 1) (("2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16") 2) (("1") 2) (("2" "3") 3) (("4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16") 3) (("11" "12" "13" "14" "15" "16") 4) (("2") 4) (("4" "5") 4) (("6" "7" "8" "9" "10") 4) (("8" "12") 4) (("12" "13" "14" "15" "16") 5) (("5") 5) (("6") 5) (("7" "8") 5) (("9") 5) (("10") 5) (("11") 5) (("12" "13") 6) (("16") 6) (("14" "15") 6) (("14") 7))
这种情况下不对 llsheng_73 发表于 2015-5-28 16:11 static/image/common/back.gif
(xxj'(("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
("11" "12" "13" ...
还有问题 请帮我看一下啊 已经解决1121312312
页:
[1]