#nt503. 组合数取模2
组合数取模2
Binomial Coefficient Modulo 2
Problem Description
Answer queries; for each query output the value of .
Input Format
The first line contains an integer , the number of queries.
For each query, one line contains two integers .
Output Format
For each query, output one line: the answer.
Sample Input
3
5 2
50 20
500 200
Sample Output
10
211914057
395607423
Constraints
For all data, , .