CF1859A United We Stand
题目描述
一共 $t$ 组数据,每组数据给定一个长度为 $n$ 数组 $a$,将其分为两个数组,使得任意第二个数组中的数不可以整除任意第一个数组中的数。
输入格式
第一行,一个 $t$($1\le t\le500$)。
之后每组数据第一行为数组大小 $n$($2\le n\le100$),第二行为 $a_1,a_2,...,a_n$($2\le a_1\le10^9$)
输出格式
对于每组数据第一行为两个数组的长度,第二行为第一个数组,第三行为第二个数组。
说明/提示
In the first test case, a solution does not exist.
In the second test case, we can obtain $ b = [1, 3, 5] $ and $ c = [2, 4] $ . Then elements $ 2 $ and $ 4 $ do not divide elements $ 1, 3 $ and $ 5 $ .
In the fifth test case, we can obtain $ b = [4, 8, 4] $ and $ c = [12, 12] $ .