No.1626 Constructing Triangles
Problem Statement
Construct all (multi)sets $\{a, b, c\}$ of $3$ positive integers satisfying the following conditions, and report them along with their count.
You are given $t$ test cases.
Constraints
Input
First, the number of test cases $t$ is given.$t$Then, over the following $t$ lines, each test case is given on one line in the following format.
$S\ T$
Output
For each test case, first output the number of (multi)sets $\{a, b, c\}$ of $3$ positive integers satisfying the conditions. Then, output all the sets. Separate the numbers with spaces or newlines.
Sample
Sample 1
Input
6 6 12 6 12 60 60 1 3 23760 864 23760 864
Output
1 3 4 5 1 5 3 4 1 29 25 6 0 2 135 352 377 132 366 366 2 132 366 366 135 352 377
The area of the right triangle with $3$ sides $3, 4, 5$ is $6$.
The order of the integers within a set and the order of the sets do not matter.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
null
sak