码迷,mamicode.com
首页 >  
搜索关键字:c const    ( 26295个结果
memmove和memcpy
1.memmove函数原型:void *memmove(void *dest, const void *source, size_t count)返回值说明:返回指向dest的void *指针参数说明:dest,source分别为目标串和源串的首地址。count为要移动的字符的个数函数说明:memm...
分类:其他好文   时间:2014-05-10 06:18:35    阅读次数:226
康托展开
康托展开X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0! 其中,a为整数,并且0#includeint const MAX_N=12;int const a[MAX_N]={0,1, 2 ,6 ,24 ,120 ,720 ,5040 ,403...
分类:其他好文   时间:2014-05-10 05:38:48    阅读次数:325
poj2560
求最小生成树 1 //Accepted 240 KB 0 ms 2 #include 3 #include 4 #include 5 const int MAXN =105; 6 const int inf = 100000000; 7 double x[MAXN],y[MAXN]...
分类:其他好文   时间:2014-05-10 05:32:29    阅读次数:240
#include<algorithm>
1. int cmp(const void *x,const void *y) {return *(int*)y-*(int*)x;}//非增序 qsort(a,n,sizeof(a[0]),cmp);//参数分别为(首位置,个数,大小,比较函数)(后续更新)2.int num=unique(a,....
分类:其他好文   时间:2014-05-10 05:29:43    阅读次数:284
unix文件操作函数
1. fopen函数1 #include 2 FILE *fopen(const char *path, const char *mode) 返回:文件顺利打开后,指向该流的文件就会被返回。如何文件打开失败则返回NULL,并把错误代码存在 errno 中。参数说明: mode: 1)r 以只读方式....
分类:其他好文   时间:2014-05-10 03:00:13    阅读次数:290
poj1988
#includeusing namespace std;const int maxn = 30000+100;int F[maxn], D[maxn], S[maxn];void set(int n){ for(int i =0 ;i >P; char c; int a, b; while(P--)...
分类:其他好文   时间:2014-05-10 02:56:28    阅读次数:313
.NET(C#):获取进程的内存私有工作集
将读取的数据写到log.txt文件中,先在工程下新建一个log.txt文件public class Program { public const string LOGGER_FILE = "log.txt"; public static void Logger(st...
分类:Web程序   时间:2014-05-09 23:03:52    阅读次数:843
HDU 4280 Island Transport 网络流裸题
非递归版好像被卡掉了,其他2个板子都能过。 #include #include #include #include #include using namespace std; #define ll int const int MAXN = 100100;//点数的最大值 const int MAXM = 400010;//边数的最大值 const int INF = 0x3f3f3f3f; st...
分类:其他好文   时间:2014-05-09 22:55:23    阅读次数:476
HDU 4717 The Moving Points(三分)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4717 思路:第一次写三分法,原理和二分法其实是一样的,计算过程两边for,时间复杂度为O(n^2log(n)) 代码: #include #include #include const double eps = 1e-6; const int N = 305; #define max(a...
分类:其他好文   时间:2014-05-09 21:11:49    阅读次数:359
Rabin Karp 算法实战
关键字Rabin karp 算法,C++,ubuntu 14.04, linux, big integer, gmp为了计算冗余度, 我写出了如下算法void HandleAMission(const char *srcFileName, FILE *output, int blockSize, i...
分类:其他好文   时间:2014-05-09 20:12:25    阅读次数:270
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!