1774: 【CSP循环-穷举】- 开学大采购█

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:5 Solved:4

Description

新学期开始了,学校计划采购一批新的篮球和排球用来上体育课。

学校共有 lns="http://www.w3.org/1998/Math/MathML">n 元经费,咨询体育用品店得知篮球 lns="http://www.w3.org/1998/Math/MathML">x 元 lns="http://www.w3.org/1998/Math/MathML">/ 个,排球 lns="http://www.w3.org/1998/Math/MathML">y 元 lns="http://www.w3.org/1998/Math/MathML">/ 个,现要求篮球和排球都至少采购 lns="http://www.w3.org/1998/Math/MathML">1 个, lns="http://www.w3.org/1998/Math/MathML">n 元经费全部用完,且篮球和排球的总数要超过 lns="http://www.w3.org/1998/Math/MathML">50 个。

请问有哪些采购方案?(按照篮球从少到多,排球从多到少输出所有可行的方案)

Input

三个整数,lns="http://www.w3.org/1998/Math/MathML">nxy 用空格隔开分别代表总经费、篮球单价、排球单价。

Output

所有可行的采购方案,每个组方案有 lns="http://www.w3.org/1998/Math/MathML">2 个整数用空格隔开,第 lns="http://www.w3.org/1998/Math/MathML">1 个整数代表篮球的采购个数,第 lns="http://www.w3.org/1998/Math/MathML">2 个整数代表排球的采购个数。

Sample Input Copy

1000 25 15

Sample Output Copy

1 65
4 60
7 55
10 50
13 45
16 40
19 35
22 30