Question: Find Subsets Arya has recently learned that Natural numbers are from 1 to N . Now since she is very curious she thought of a
Find Subsets
Arya has recently learned that Natural numbers are from to Now since she is very curious she thought of a problem which she can't solve since she is just a little girl. The problem is obviously going to be easy as asked by a little girl. Now as you are very intelligent can you help the little girl? subset.
Since the answer could be very large print it modulo
Note: In all the subsets the numbers are sorted.
Input format
The first line contains T the number of test cases.
In each of the test case, the first line contains two spaceseparated integers NQ
In each of the Q query you are given two spaceseparated integers i p
Output format
For each test case print the required answer modulo
Constraints
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
