![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
排序
文章平均质量分 88
xiaohuihuicb
分享快乐
展开
-
sort 进行下标排序
在多个数据关联,需要进行排序又不想写结构体怎么办。一种很好的方法就是进行数组的下表排序。这里给出直接用库函数sort的下标排序。/**********************用sort对下标进行排序*********************/#include #include using namespace std;int a[8] = {0,8,65,1,4,1,3,5};原创 2015-07-29 21:11:00 · 3546 阅读 · 0 评论 -
求逆序对——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 sequenc原创 2015-07-29 20:32:16 · 649 阅读 · 0 评论 -
HDU --1157 Who's in the Middle——nth_element
DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more than the median; half give as much o原创 2015-07-29 22:54:42 · 586 阅读 · 0 评论