4498: L. Station of Fate
内存限制:256 MB
时间限制:1 S
标准输入输出
题目类型:传统
评测方式:Special Judge
上传者:
提交:0
通过:0
题目描述
There are n people standing in m stations, forming m queues.
You don't know which person is in which station, or in what order they are standing in queue, so you want to count the number of different schemes. Two schemes are considered different, if and only if there exists a station whose queue consists of different people, or has different orders.
Calculate the number of different schemes modulo 998, 244, 353.
You don't know which person is in which station, or in what order they are standing in queue, so you want to count the number of different schemes. Two schemes are considered different, if and only if there exists a station whose queue consists of different people, or has different orders.
Calculate the number of different schemes modulo 998, 244, 353.
输入格式
The first line contains an integer T (1 ≤ T ≤ 100), denoting the number of test cases. Then T test cases follow.
Each test case contains a single line containing two integers n, m (1 ≤ m ≤ n ≤ 105).
Each test case contains a single line containing two integers n, m (1 ≤ m ≤ n ≤ 105).
输出格式
For each test case, output the number of different schemes modulo 998, 244, 353.
输入样例 复制
2
3 2
6 3
输出样例 复制
12
7200