#P3910. 纪念邮票
纪念邮票
Description
The post office has recently released a set of commemorative stamps. There are stamps in this set, each with a different face value, in order cent, cents, …, cents.
Xiaoming is a stamp collector. He likes this set very much, but he only has cents, which is not enough to buy the whole set. However, he wants to spend exactly all his money. As a collector, he also does not want the stamp numbers to be discontinuous, so he plans to buy consecutive stamps with values from cents to cents, and the total value is exactly cents.
Your task is to find all valid plans and output them in the form .
Input Format
The input consists of a single line containing two integers and (), separated by a space.
Output Format
Output each valid plan on a separate line as , in increasing order of .
20 15
[1,5]
[4,6]
[7,8]
[15,15]
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号