五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網 會員登陸 & 注冊

CF 1790B - Taisia and Dice

2023-07-18 13:56 作者:您是打尖兒還是住店呢  | 我要投稿

Taisia has n six-sided dice. Each face of the die is marked with a number from 1 to 6, each number from 1 to 6 is used once.


Taisia rolls all n dice at the same time and gets a sequence of values a1,a2,…,an (1≤ai≤6), where ai is the value on the upper face of the i-th dice. The sum of this sequence is equal to s.


Suddenly, Taisia's pet cat steals exactly one dice with maximum value ai and calculates the sum of the values on the remaining n?1 dice, which is equal to r.

You only know the number of dice n and the values of s, r. Restore a possible sequence a that fulfills the constraints.

Input

The first line contains the integer t (1≤t≤1000) — the number of testcases.

Each testcase is given on a separate line and contains three integers n, s, r (2≤n≤50, 1≤r<s≤300).

It is guaranteed that a solution exists.


Output

For each testcase, print: n integers a1,a2,…,an in any order. It is guaranteed that such sequence exists.


If there are multiple solutions, print any.

Example

----------------------------------------------

Taisia 有 n 個六面骰子。 骰子的每個面都標有1到6的數(shù)字,1到6的每個數(shù)字只能使用一次。


Taisia 同時擲所有 n 個骰子,得到一系列值 a1,a2,…,an (1≤ai≤6),其中 ai 是第 i 個骰子上表面的值。 該序列的總和等于 s。


突然,泰西亞的寵物貓恰好偷走了一顆具有最大值 ai 的骰子,并計算了剩余 n?1 個骰子的值之和,等于 r。

你只知道骰子的個數(shù)n和s、r的值。 恢復滿足約束的可能序列a。

輸入

第一行包含整數(shù) t (1≤t≤1000) — 測試用例的數(shù)量。

每個測試用例都在單獨的行上給出,并包含三個整數(shù) n、s、r(2≤n≤50、1≤r<s≤300)。

保證存在解。


輸出

對于每個測試用例,打?。簄 個整數(shù) a1,a2,…,an(按任意順序)。 保證這樣的序列存在。


如果有多個解決方案,請打印其中一個。

例子

--------------------------------------------

計算平均值,保留余數(shù),每次都用平均數(shù)+1,然后余數(shù)--,直到余數(shù)為0;

輸出即可;

下面是代碼:


CF 1790B - Taisia and Dice的評論 (共 條)

分享到微博請遵守國家法律
枝江市| 富源县| 平度市| 水富县| 綦江县| 揭东县| 嘉鱼县| 大港区| 太和县| 克拉玛依市| 花垣县| 富蕴县| 大竹县| 新郑市| 齐齐哈尔市| 郓城县| 沙河市| 淳化县| 霍邱县| 韶关市| 五寨县| 望谟县| 柘荣县| 泰宁县| 六安市| 邵阳市| 衡水市| 江油市| 偏关县| 临颍县| 阿克陶县| 兴山县| 鹤峰县| 木里| 莱芜市| 加查县| 和林格尔县| 西畴县| 闽侯县| 阿鲁科尔沁旗| 仁怀市|