摘要: 看了大神的博客:http://user.qzone.qq.com/289065406/blog/1304831877题意: 在n (n#include#includeusing namespace std;struct Node{ int x; Node *next;}hash[1000... 阅读全文
posted @ 2014-06-16 19:48 _一千零一夜 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题意:给定一个整数序列 问 只允许相邻的两个数交换 至少需要交换多少次思路:归并排序#include __int64 count;int array[500001],temp[500001]; void merge(int array[],int p,int q,int r) ///// p < ... 阅读全文
posted @ 2014-06-16 18:36 _一千零一夜 阅读(127) 评论(0) 推荐(0) 编辑