8000 change set union, intersection and symmetric difference symbol · lwmonster/leetcode@a935805 · GitHub
[go: up one dir, main page]

Skip to content

Commit a935805

Browse files
committed
change set union, intersection and symmetric difference symbol
1 parent 2d1a7c9 commit a935805

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/chapBruteforce.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ \subsubsection{增量构造法}
134134
\subsubsection{二进制法}
135135
本方法的前提是:集合的元素不超过int位数。用一个int整数表示位向量,第$i$位为1,则表示选择$S[i]$,为0则不选择。例如\fn{S=\{A,B,C,D\}},则\fn{0110=6}表示子集\fn{\{B,C\}}。
136136

137-
这种方法最巧妙。因为它不仅能生成子集,还能方便的表示集合的并、交、差等集合运算。设两个集合的位向量分别为$B_1$$B_2$,则$B_1|B_2, B_1 \& B_2, B_1 \^ B_2$分别对应集合的并、交、对称差。
137+
这种方法最巧妙。因为它不仅能生成子集,还能方便的表示集合的并、交、差等集合运算。设两个集合的位向量分别为$B_1$$B_2$,则$B_1\cup B_2, B_1 \cap B_2, B_1 \triangle B_2$分别对应集合的并、交、对称差。
138138

139139
二进制法,也可以看做是位向量法,只不过更加优化。
140140

0 commit comments

Comments
 (0)
0