← 返回 capitalone 的题目列表Distribute Numbers into Two Arrays
类型:online_judge
Given an array, distribute its elements into two arrays. The first element goes to the first array, and the second element goes to the second array. For each following element, place it in the array with more numbers greater than the current element; if equal, choose the shorter array; if still equal, choose the first array. Finally, output the concatenated result of the first and second arrays.
Example
Input
[0, 100, 100, 0, 100, 14]