問題一覧 > 通常問題

No.1475 Clock Gears Easy

レベル : / AI推定難易度 : 104 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 206
作問者 : Renoirryou / テスター : 👑 qand
お気に入りにしたユーザー ProblemId : 6241 / 自分の提出
問題文最終更新日: 2021-04-10 18:08:37
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original

Problem Statement

RenoirRyou runs the RenoirRyou Clock Repair Shop.

One day, he mixed up the parts of the $N$ clocks entrusted to him by customers.

Fortunately, the parts were still grouped by clock. However, they cannot be repaired in this state, so you have decided to sort the parts on behalf of RenoirRyou.

The $i$-th clock has $K_i$ parts, and the size of the $j$-th of them is $L_{i,j}$.

For each clock, rearrange its parts so that larger ones are on the left, and output them separated by spaces.

Note that there may be parts of the same size.

Input

$N$
$K_1 \ L_{1,1}\ L_{1,2} \dots \ L_{1,K_1}$
$ \vdots$
$K_N \ L_{N,1}\ L_{N,2} \dots \ L_{N,K_N}$

  • $1 \le N \le 20$
  • $1 \le K_i \le 20$
  • $1\le L_{i,j}\le 1000$
  • All inputs are integers.
  • Output

    Output over $N$ lines.

    On the $i$-th line, output the parts of the $i$-th clock sorted in descending order, separated by spaces.

    Sample

    Sample 1
    Input
    2
    3 1 3 4
    4 4 2 3 5
    Output
    4 3 1
    5 4 3 2

    Note that the output is done for each clock separately.

    Sample 2
    Input
    1
    8 1 4 89 8 5 4 344 209
    Output
    344 209 89 8 5 4 4 1

    Sample 3
    Input
    1
    1 1
    Output
    1

    Sample 4
    Input
    2
    3 49 184 23
    2 210 39
    Output
    184 49 23
    210 39

    They got all mixed up. Oh dear.

    提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。