📄 906.txt
字号:
发信人: fervvac (高远), 信区: DataMining
标 题: Re: 请教求子集的算法
发信站: 南京大学小百合站 (Wed May 29 16:03:07 2002), 站内信件
A macro to get the j-th bit of the binary representation of i, easily
done by bit shifting and masking.
【 在 billylin (fat billy) 的大作中提到: 】
: 【 在 fervvac (高远) 的大作中提到: 】
: : for i = 0 to 2^n - 1
: : for j = 0 to n - 1
: : if GET_BIT(i, j)
: ~~~~~~~~~~~~~~~~不好意思,这句是什么意思,可否解释一下,谢谢
: : print asc('A'+j)
: : print "\n"
--
※ 来源:.南京大学小百合站 bbs.nju.edu.cn.[FROM: 饮水思源BBS]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -