Simple Graph

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

문제

An undirected simple graph GG can be divided into connected components. Let xx be the number of trees among these components. Then the value of graph GG is defined as xkx^k.

Given nn and kk, your task is to calculate the sum of values of all undirected simple graphs with exactly nn labeled vertices. Print the answer modulo 998,244,353998\\,244\\,353.

Note that a simple graph is an undirected graph in which both multiple edges and loops are disallowed. A connected component (or just component) of an undirected graph is a subgraph in which any two vertices are connected to each other by paths, and which is not connected to any other vertex in the graph.

입력

The first line contains an integer T100T \le 100, denoting the number of test cases. Each of next TT lines contains two space-seperated integers nn and kk (1n1041 \le n \le 10^4, 1k201 \le k \le 20).

출력

For each test case, print a single line containing the answer.