Cell
题号:NC237533
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

Lucy is playing a game named . The game is played on an infinite two-dimensional plane. At the beginning, every grid point has exactly one cell, while other points are empty.

Lucy will play the game for k seconds. During each second, every cell divides itself into 4 copies and the copies then spread. Assume that a cell locates at point (x,y) at the start of the second, and at the end of the second, its 4 copies will locate at coordinates respectively. The original cell completes its life mission and disappears.

Assume that the cells will reproduce following the above rules second by second. Lucy wants to know that, if everything goes on well, how many cells will be at the coordinate (n,m) at the end of the k-th second. As the answer may be enormous, you just need to print it modulo 998244353.

输入描述:

The first line contains one integer  , indicates the number of testcases .

Then T lines , each line contains three integers n,m,k .

The sum of n,m,k will not exceed .

输出描述:

For each test case, print an integer indicates the answer modulo 998244353.
示例1

输入

复制
2
1 1 1
1 1 2

输出

复制
2
6

说明