码迷,mamicode.com
首页 >  
搜索关键字:the inversion number    ( 27715个结果
HDU - 1711 Number Sequence
题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=1711 改进的模式匹配算法--KMP算法,时间复杂度有O(n*m)降到O(n+m),求解next数组之后与常规的模式匹配算法相同。 1 #include 2 const int maxn=100...
分类:其他好文   时间:2014-07-27 23:11:29    阅读次数:221
找出数组中出现次数超过一半的元素
题目:找出数组中出现次数超过一半的元素解法:每次删除数组中两个不同的元素,删除后,要查找的那个元素的个数仍然超过删除后的元素总数的一半#include int half_number(int a[], int n){ if( a == NULL || n void find(int a[], ...
分类:其他好文   时间:2014-07-27 23:09:29    阅读次数:169
Understanding Linux /proc/cpuinfo
http://www.richweb.com/cpu_infoA hyperthreaded processor has the same number of function units as an older, non-hyperthreaded processor. It just has t...
分类:系统相关   时间:2014-07-27 22:56:19    阅读次数:518
CodeForces250B——Restoring IPv6(字符串处理)
Restoring IPv6DescriptionAn IPv6-address is a 128-bit number. For convenience, this number is recorded in blocks of 16 bits in hexadecimal record, the...
分类:其他好文   时间:2014-07-27 22:53:39    阅读次数:301
Problem E CodeForces 237C
DescriptionYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has e...
分类:其他好文   时间:2014-07-27 22:51:29    阅读次数:288
CodeForces 237C Primes on Interval
DescriptionYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has e...
分类:其他好文   时间:2014-07-27 22:31:39    阅读次数:809
HDU 1394 Minimum Inversion Number
//============================================================================// Name : B.cpp// Author : L_Ecry// Version :// Copyrigh...
分类:其他好文   时间:2014-07-27 22:20:39    阅读次数:167
实现sqrt()函数
求一个正数N的开方, 并且可以指定精度, 要求不能用库函数sqrt方法一:如下所示,先求sqrt(N)的整数部分,再求小数点后1位,2位 ... ...方法二:牛顿迭代法,根据公式 Ai+1 = (Ai+number/Ai)/2 ,其中Ai 的初始值,即A1任取,如1,2,3 ...// 求一个正数...
分类:其他好文   时间:2014-07-27 22:00:29    阅读次数:251
函数知识要点
函数函数是具有特定功能的代码块,函数使得程序更加模块化,这样便于人们阅读,修改,完善程序1.函数的定义:返回值类型函数名(形式参数){声明语句}无参函数举例voidhello()//无参数无返回值{printf(“HelloWorld");}intpeopleCount()//无参数有返回值{return33;}有参函数举例intmax..
分类:其他好文   时间:2014-07-27 14:19:58    阅读次数:342
开机流程
电脑开机流程:按下电源键后,固化在BIOS中的程序首先对系统硬件进行自检,自检通过后,就读取CMOS中的系统启动序列参数,根据序列找到存储介质(硬盘、光盘、U盘等)上的MBR,并将控制权交给MBR中的引导程序,由MBR主引导记录加载系统内核,之后内核获得控制权装载操作系统。M..
分类:其他好文   时间:2014-07-27 12:08:13    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!