问题 A: Number Table

内存限制:256 MB 时间限制:3 S
题面:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述

The Spartan family is playing an early education number table game. The game is played on a table with two rows and n columns. Uncle Dante fills the first row, while Father Vergil fills the second row. They want Nero to calculate how many arrangements are possible so that the bitwise XOR sum of all the numbers is 00. Please note that the numbers in the table cannot be filled arbitrarily. Uncle Dante and Father Vergil can only fill nonnegative integers from the range [0,2�)[0,2k) in each table cell. Moreover, there should be no repeated numbers in the same row or column. Now, they want to ask Nero how many possible arrangements exist to fill the table. Nero doesn't want to answer this question; he just wants to go and accompany Kyrie. He leaves the question for you to answer.

输入格式

The first line contains only one positive integer T(1≤�≤10)(1T10). which represents the number of test cases.

Next, there will be T lines, each containing two positive integers, n and k, where 1≤�≤401n40 and 1≤�≤100001k10000.

输出格式

For each test case, output one line containing an integer representing the answer mod 998244353998244353.

输入样例 复制

4
1 1
2 1
2 2
3 3

输出样例 复制

0
2
36
8736