using prev // 90 subset2 sorting the array first and check the contains ...
分类:
其他好文 时间:
2018-05-15 14:01:29
阅读次数:
177
BaoBao has just found a strange sequence {<, >, <, >, , <, >} of length in his pocket. As you can see, each element <, > in the sequence is an ordered ...
分类:
移动开发 时间:
2018-05-08 14:37:31
阅读次数:
571
至今都不知道置换群是个什么东西……题解说什么就是什么.jpg 以下来自hzwer:http://hzwer.com/3905.html cpp include include include using namespace std; const int N=10005; int n,w[N],a[N ...
分类:
编程语言 时间:
2018-05-05 16:52:01
阅读次数:
156
题意:给你一些字符串,字符串的权值是逆序对个数,对这个权值排序字符串 对每个字符串归并排序求逆序对即可(我归并排序写跪了就很捞) ...
分类:
其他好文 时间:
2018-05-02 20:55:52
阅读次数:
112
Discription The Little Elephant loves permutations of integers from 1 to n very much. But most of all he loves sorting them. To sort a permutation, th ...
分类:
其他好文 时间:
2018-05-01 20:51:41
阅读次数:
187
BaoBao has just found a strange sequence {<, >, <, >, , <, >} of length in his pocket. As you can see, each element <, > in the sequence is an ordered ...
分类:
移动开发 时间:
2018-04-30 14:42:05
阅读次数:
361
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2838 题目大意: 就是求将之前的排列变成一个递增的排列,每交换两个数的代价为两个数的和,求变成递增的排列所需的最小代价为多少。 其实就是求出逆序对的花费(每对逆序对的花费是这个逆序对的和) 解题思路: ...
分类:
其他好文 时间:
2018-04-27 02:38:54
阅读次数:
154
排序(Sorting),特别是高效的排序一直是计算机工作学习和研究的重要课题之一,排序有内部排序和外部排序之分,若整个排序过程不需要访问外存便能完成,则称此类排序为内部排序,反之则为外部排序。本篇将对常用排序算法进行总结。 在进行排序总结之前先介绍测试中常用到的生成随机数方法和计算执行时间的方法。 ...
分类:
编程语言 时间:
2018-04-26 16:56:36
阅读次数:
177
Waca loves maths,.. a lot. He always think that 1 is an unique number. After playing in hours, Waca suddenly realize that every integer can be represe ...
分类:
其他好文 时间:
2018-04-24 21:51:07
阅读次数:
189
Discription Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is d ...
分类:
其他好文 时间:
2018-04-24 20:26:52
阅读次数:
130