五月天青色头像情侣网名,国产亚洲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的評論 (共 條)

分享到微博請遵守國家法律
若尔盖县| 博兴县| 邯郸县| 崇文区| 德阳市| 元阳县| 青海省| 辛集市| 大城县| 长治市| 清水河县| 洪洞县| 新巴尔虎右旗| 齐齐哈尔市| 莱西市| 城市| 焉耆| 炉霍县| 永仁县| 罗定市| 昂仁县| 潮安县| 弥勒县| 讷河市| 永新县| 湖南省| 炉霍县| 丰台区| 漳浦县| 新建县| 垦利县| 安阳市| 余江县| 东兴市| 来宾市| 红安县| 来凤县| 安远县| 双牌县| 南雄市| 蒙城县|