| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 3 초 | 512 MB | 15 | 5 | 4 | 66.667% |
A vertex cover of an undirected simple graph $G = (V, E)$ is a subset $S \subseteq V$ such that for every $(u, v) \in E$ we have $u \in S$ or $v \in S$. The size a of vertex cover $S$ is defined as $|S|$.
You need to determine what is the number of simple graphs with $n$ vertices whose smallest vertex cover has size exactly $k$.
Two graphs $G_1 = (V, E_1)$ and $G_2 = (V, E_2)$ are considered different if and only if there exist two vertices $u, v \in V$ ($u\neq v$) such that edge $(u, v)$ belongs to exactly one of the sets $E_1$, $E_2$.
Since the answer can be very big, it suffices to print it modulo $2$.
The first line of the input contains an integer $q$ ($1 \le q \le 2^{8}$) denoting the number of queries. The following $q$ lines contain descriptions of individual queries. The $i$-th of them contains the description of the $i$-th query: two integers $n_i$ and $k_i$ ($1 \le n_i < 2^{8}$, $0 \le k_i < n_i$), denoting the number of vertices of $G$ (i.e., $|V|=n_i$) and the desired size of the smallest vertex cover, respectively.
You should print $q$ lines. The $i$-th of them should contain either $0$ or $1$ -- the answer to the $i$-th query.
4 3 1 5 4 5 3 57 32
0 1 1 1