排序
文章平均质量分 50
wb129945130
这个作者很懒,什么都没留下…
展开
-
HDU 4911
Description bobo has a sequence a 1,a 2,…,a n. He is allowed to swap two adjacent numbers for no more than k times. Find the minimum number of inversions after his swaps. Note: The number of inversion原创 2015-08-08 16:37:44 · 325 阅读 · 0 评论 -
归并排序
void Merge(int array[], int start, int mid, int end)//归并排序的合并算法 { int temp1[10], temp2[10]; int n1, n2; n1 = mid - start + 1; n2 = end - mid; for (int i = 0; i < n2; i++){原创 2015-08-04 10:14:25 · 249 阅读 · 0 评论 -
POJ2299 Ultra-QuickSort
DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence i原创 2015-08-04 16:17:20 · 287 阅读 · 0 评论