navigation switch
Home
Contests
Notification
Clarification
Problems
Ranklist
Status
HackStatus
Find Sequence
Accepts: 4
Submissions: 132
Time Limit: 5000/3000 MS (Java/Others)
Memory Limit: 131072/131072 K (Java/Others)
Problem Description
Give you an positive integer sequence $a_1, a_2, \ldots, a_i, \ldots, a_n$, and they satisfy $a_1+a_2+ \ldots +a_i+ \ldots +a_n = M(0
Input
The first line in the input file is an Integer $T(1 \leq T \leq 30)$. The first line of each test case contains two integer $n, M(0
Output
For each test case, output the maximum t.
Sample Input
Copy
2 6 19 3 2 1 3 4 6 1 4194304 4194304
Sample Output
Copy
5 1
Hint
For the first testcase, The Sequence is 1 2 3 4 6