-
-
[旧帖]
[求助]一个像是排列又不是的算法。。。
0.00雪花
-
发表于:
2009-2-4 22:08
3440
-
[旧帖] [求助]一个像是排列又不是的算法。。。
0.00雪花
本人脑子不好使,苦思冥想,白发苍苍。。。。。。
遇到了难题:
给定一个字符集合:{A ,B,C,D,E,F....}从这N个元素中取出k(<n||>0)个元素,每个元素都可以重复取出,但组合出的数只能为k个,
例如:取出2个。A ,B, 可以组成: AA,AB,BA,BB.
又:E,F,D.。。可以组成:EEE,EEF,EED,EFD,EFF,DFF,DFE,DEF,,,,,,,,,,,,,,,,.
就这样,不知道哪位大侠能够想出某种算法实现他,谢谢了
小弟不甚感激~~~!
[课程]Android-CTF解题方法汇总!