![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
排序
jiruqianlong123
这个作者很懒,什么都没留下…
展开
-
初识归并排序
归并排序(自我理解): 就是将数组分小,小到长度为2(或者为1)的数组,先解决两个数的排序,然后将长度为2的数组两个连接起来变成长度为4(在连接的过程中有排序),然后两个长度为4的数组相连变成长度为8(相连时仍然排序,但复杂度是0(n)哦),依次往下。 总的来说就是分小,分到足够小时开始排序并,然后以排序的部分开始变大,变到和原来一样大时就排好了下面时盗来的原理...原创 2018-08-09 19:57:39 · 136 阅读 · 0 评论 -
逆序对——归并排序
给定一个1-N的排列A1, A2, … AN,如果Ai和Aj满足i < j且Ai > Aj,我们就称(Ai, Aj)是一个逆序对。 求A1, A2 … AN中所有逆序对的数目。 Input 第一行包含一个整数N。 第二行包含N个两两不同整数A1, A2, … AN。(1 <= Ai <= N) 对于60%的数据 1 <= N &原创 2018-08-10 14:18:04 · 288 阅读 · 0 评论 -
ACM Rank Table
ACM contests, like the one you are participating in, are hosted by the special software. That software, among other functions, preforms a job of accepting and evaluating teams’ solutions (runs), and d...原创 2018-08-14 14:02:41 · 407 阅读 · 0 评论 -
G - SDOI
The Annual National Olympic of Information(NOI) will be held.The province of Shandong hold a Select(which we call SDOI for short) to choose some people to go to the NOI. n(n≤100)n(n≤100) people comes ...原创 2018-08-14 16:55:59 · 312 阅读 · 0 评论