Question
Circle Angle Puzzle
Liam was feeling puzzled after hearing Ethan’s mysterious story. To lighten the mood, Ethan decides to distract him with a quick riddle. He arranges K enchanted stones in a perfect circle, equally spaced, and numbers them from 1 to K in a clockwise order.
Pointing to two stones, X and Z, he asks, “How many choices are there for a third stone, Y, such that the angle XYZ is obtuse?”
Liam’s curiosity is piqued, and he’s ready for the challenge.
Input
The first line of the input contains single integer T, denoting number of test cases.
Each test case contains three integers K, X and Z.
Constraints
1 ≤ T ≤ 10
1 ≤ K ≤ 109
1 ≤ X, Y ≤ K
Each test case contains three integers K, X and Z.
Constraints
1 ≤ T ≤ 10
1 ≤ K ≤ 109
1 ≤ X, Y ≤ K
Output
For each test case print number of possible Y in a new line.
Example
Sample Input
2
6 1 3
10 1 5
Sample Output
1
3
Explanation
For first case, 2 is the suitable skull.
For second case, 2, 3 and 4 are the suitable skulls.
2
6 1 3
10 1 5
Sample Output
1
3
Explanation
For first case, 2 is the suitable skull.
For second case, 2, 3 and 4 are the suitable skulls.