#889. C++-桶排序-定义一整数数组,如:30个整数...,并通过桶排序进行排序并打印
C++-桶排序-定义一整数数组,如:30个整数...,并通过桶排序进行排序并打印
Background
Description
C++-桶排序-定义一整数数组,如:30个整数:1 59 8 10 38 23 17 7 20 10 10 23 69 10 22 10 51 90 55 10 10 10 10 10 23 38 9 9 1 18 1,并通过桶排序进行排序并打印
Format
Input
Output
Samples
5
100
30
1 59 8 10 38 23 17 7 20 10 10 23 69 10 22 10 51 90 55 10 10 10 10 10 23 38 9 9 1 18 1
bucket_size=20
bucket[0].size()=18~ 1 1 7 8 9 9 10 10 10 10 10 10 10 10 10 10 17 18
bucket[1].size()=7~ 20 22 23 23 23 38 38
bucket[2].size()=3~ 51 55 59
bucket[3].size()=1~ 69
bucket[4].size()=1~ 90
1 1 7 8 9 9 10 10 10 10 10 10 10 10 10 10 17 18 20 22 23 23 23 38 38 51 55 59 69 90
Limitation
1s, 1024KiB for each test case.