摘要: @echo offfor /f "delims=" %%i in ('dir/b/ad') do (ren "%%i\*.nes" "%%~ni.nes")pausehttp://zhidao.baidu.com/question/43360138.html?si=3 阅读全文
posted @ 2011-02-23 17:08 SunnyDay2015 阅读(316) 评论(0) 推荐(0) 编辑
摘要: sourceforge http://sourceforge.net/java.net http://www.java.netwww.eclipse.orgwww.opensource.orgLomboz http://www.objectlearn.com/index.jsp (J2EE plugin for Eclipse)htmlArea http://sourceforge.net/projects/itools-htmlarea/ (所见即所得的在线HTML编辑器)XmlBuddy http://www.xmlbuddy.com/ (XML Editor plugin for Ecl 阅读全文
posted @ 2011-02-23 11:20 SunnyDay2015 阅读(1479) 评论(0) 推荐(0) 编辑
摘要: In computer science, a hash table is an associative array data structure that associates keys with values. The primary operation it supports efficiently is a lookup, where it is given a key, an identifier for the information to be found such as a person's name, and asked to find the correspondin 阅读全文
posted @ 2011-02-21 20:06 SunnyDay2015 阅读(2161) 评论(0) 推荐(0) 编辑
摘要: 选最大或最小值的时候可以用第一节的算法,如果既要最大值,又要最小值,那就先从输入序列中去前两个元素比较大小,将较小者与当前min比较,较大者与当前max比较,需要3次比较。 阅读全文
posted @ 2011-02-21 14:33 SunnyDay2015 阅读(231) 评论(0) 推荐(0) 编辑
摘要: BUCKET-SORT(A)1 n ← length[A]2 for i ← 1 to n3 do insert A[i] into list B[⌊n A[i]⌋]4 for i ← 0 to n - 15 do sort list B[i] with insertion sort6 concatenate the lists B[0], B[1], . . ., B[n - 1] together in order 阅读全文
posted @ 2011-02-21 14:25 SunnyDay2015 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 基数排序是对位数相同的一组数据进行排序的算法。主要依赖一种稳定的排序(比如计数排序)从低到高对每一个数位排序,算法复杂度为sita(d(n+k)),d是数据的位数,(n+k)是计数排序的复杂度。 阅读全文
posted @ 2011-02-21 14:20 SunnyDay2015 阅读(292) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <cstdlib>#include <time.h>using namespace std;//待排数据在[0,k]范围内,也可以改变上下界,不过要注意一定让//这个范围的大小大于或等于待排数据的范围,也可以把k+1理解过为//待排数据的种类数。数组下标从1开始,length是数据总量,k是数据//种类void CountingSort(int A[] , int length , int B[] , int k){ int *C = new int[k]; //初始化,将所有统计数据记为0。 for( 阅读全文
posted @ 2011-02-21 14:06 SunnyDay2015 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 这个定理要证明的是一比较为基础的时间复杂度的下界是O(n*lgn)。证明过程是利用n!<=l<=2^h(不是很明白为什么n!<=l,觉得二者相等),再取对数,得到h>=lg(n!)=Ω(nlgn)。 阅读全文
posted @ 2011-02-21 11:52 SunnyDay2015 阅读(336) 评论(2) 推荐(0) 编辑
摘要: 一 问题描述 对一个较大规模的数组进行排序,分别使用冒泡,快速,和堆排序,比较这三种方法的效率.二 算法分析与设计 三种算法要比较哪一个效率更高,必须使用相同的数组进行排序,而且数组的元素个数要相当大,这样才能够看处它们执行效率的差别。要输入一个很大的数组显然不符合现实,因为工程太庞大了,所以我们用随机产生函数:rang()来产生所要的数组,虽然每次产生的数组都不一样,但是随机性更能体现出一个算法执行的好和坏。我们并不是就执行一次,而是通过多次的执行得出结论。 数组产生了以后,接下来的事情就是用每一种排序方法对产生的数组进行排序,同时记录下排序所需要的时间,我们通过所花时间的多少来比较哪个算法 阅读全文
posted @ 2011-02-20 11:46 SunnyDay2015 阅读(1915) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <cstdlib>using namespace std;void swap(int array[] , int i , int j){ array[i] = array[i]+array[j]; array[j] = array[i]-array[j]; array[i] = array[i]-array[j];}int Parent(int i){ if(i>1) { return i/2; } else { return 0; }}void MaxHeapify(int array[] , int i 阅读全文
posted @ 2011-02-15 16:21 SunnyDay2015 阅读(340) 评论(0) 推荐(0) 编辑