You are given a binary matrix $b$ (all elements of the matrix are $0$ or $1$) of $n$ rows and $n$ columns.
You need to construct a $n$ sets $A_1, A_2, \ldots, A_n$, for which the following conditions are satisfied:
- Each set is nonempty and consists of distinct integers between $1$ and $n$ inclusive.
- All sets are distinct.
- For all pairs $(i,j)$ satisfying $1\leq i, j\leq n$, $b_{i,j}=1$ if and only if $A_i\subsetneq A_j$. In other words, $b_{i, j}$ is $1$ if $A_i$ is a proper subset of $A_j$ and $0$ otherwise.
Set $X$ is a proper subset of set $Y$, if $X$ is a nonempty subset of $Y$, and $X \neq Y$.
/*
cf1761C
0001
1001
0001
为使每个集合S不同,可以为其加上索引xs
1.若S'是S的祖先,可为S'加上xs,因为S'有独特索引,所以S' != S
2.若T与S无关,因都有独特索引,故不相同
*/