Vertex covers

아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

A vertex cover of an undirected simple graph G=(V,E)G = (V, E) is a subset SVS \subseteq V such that for every (u,v)E(u, v) \in E we have uSu \in S or vSv \in S. The size a of vertex cover SS is defined as S|S|.

You need to determine what is the number of simple graphs with nn vertices whose smallest vertex cover has size exactly kk.

Two graphs G_1=(V,E_1)G\_1 = (V, E\_1) and G_2=(V,E_2)G\_2 = (V, E\_2) are considered different if and only if there exist two vertices u,vVu, v \in V (uvu\neq v) such that edge (u,v)(u, v) belongs to exactly one of the sets E_1E\_1, E_2E\_2.

Since the answer can be very big, it suffices to print it modulo 22.

입력

The first line of the input contains an integer qq (1q281 \le q \le 2^{8}) denoting the number of queries. The following qq lines contain descriptions of individual queries. The ii-th of them contains the description of the ii-th query: two integers n_in\_i and k_ik\_i (1n_i<281 \le n\_i < 2^{8}, 0k_i<n_i0 \le k\_i < n\_i), denoting the number of vertices of GG (i.e., V=n_i|V|=n\_i) and the desired size of the smallest vertex cover, respectively.

출력

You should print qq lines. The ii-th of them should contain either 00 or 11 -- the answer to the ii-th query.

힌트

  • In the first query VV has size 33. Simple graphs with vertices set VV with the smallest vertex cover of size 11 are exactly the graphs with either one or two edges. There are six of them.
  • In the second query, if a graph on 55 vertices has the smallest vertex cover of size 44, it has to be a clique.