摘要: 1 #include 2 const int MAX = 500000; 3 int a[MAX]; 4 int swap[MAX]; //临时数组 5 int n; //数组a的长度 6 __int64 result; //数组a中的逆序数 7 8 //归并两个已经有序的段:a[low]—a[mid]和a[mid+1]—a[high],使得a[low]—a[high]有序。 9 void merge(int low, int mid, int high)10 {11 int i = low;12 int ... 阅读全文
posted @ 2013-11-09 14:35 crazy_apple 阅读(262) 评论(0) 推荐(0) 编辑