2011年8月23日 星期二

C-集合

列出{1,2,....,n}之所有子集,包括空集合ϕ

code:(參考名題百則)


notion:
產生布林表
利用i,j找出對應值
0000 --> {}
1000 --> {1}
0100 --> {2}
1100 --> {1,2}
0010 --> {3}
1010 --> {1,3}
0110 --> {2,3}
依此類推

2011年8月15日 星期一

Linux vim copy and paste

if copy and paste can't work

in vim

:h gui-clipboard

add this line in _vimrc
source $VIMRUNTIME/mswin.vim