无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

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

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的評論 (共 條)

分享到微博請遵守國家法律
松阳县| 尉犁县| 新乡县| 疏附县| 云梦县| 临漳县| 广州市| 四会市| 永顺县| 兴安盟| 通道| 华亭县| 化隆| 张掖市| 洛浦县| 集贤县| 大连市| 浑源县| 东光县| 永和县| 深泽县| 库车县| 新巴尔虎右旗| 天门市| 茌平县| 武义县| 鄂托克前旗| 兴安盟| 商河县| 闻喜县| 江口县| 东宁县| 田阳县| 漠河县| 于田县| 历史| 河池市| 美姑县| 广西| 武平县| 大方县|