#P4369. [Code+#4] 组合数问题
[Code+#4] 组合数问题
Description
As we all know, Xiao Cong is good at calculations, especially at computing binomial coefficients. So Xiao Cong gives you two numbers and , and wants you to express as the sum of exactly distinct binomial coefficients. By distinct, we mean that for two binomial coefficients and , if or , then these two binomial coefficients are considered different. To keep the computation from being too complex, you must ensure that every binomial coefficient you provide satisfies . It is guaranteed that there is a solution.
Input Format
Read from standard input.
The first line contains two integers .
Output Format
Output to standard output.
Output lines. Each line contains two integers representing a binomial coefficient . If multiple answers are possible, output any one of them.
6 2
3 1
3 2
Hint
For of the testdata, .
For another of the testdata, .
For another of the testdata, .
For of the testdata, .
Credit: https://www.luogu.org/discuss/show/38908
Translated by ChatGPT 5
京公网安备 11011102002149号