码迷,mamicode.com
首页 >  
搜索关键字:es6 let const    ( 43838个结果
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
UTF8-GBK WideCharToMultiByte MultiByteToWideChar
//MFC版本CString UTF8ToGBK(const CString& strUTF8){ //确定转换为Unicode需要多少缓冲区(返回值也包含了最后一个NULL字符) int len = MultiByteToWideChar(CP_UTF8, 0, strUTF8, -1, NULL...
分类:其他好文   时间:2014-05-09 23:05:27    阅读次数:461
.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
Sicily 1735 Encryption (模拟)
链接:http://soj.me/show_problem.php?pid=1735&cid= Description Let me introduce an easy method of encryption to you. Suppose there’re N bytes (1 byte = 8 bits) data that are to be encrypted and ...
分类:其他好文   时间:2014-05-09 22:46:01    阅读次数:498
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
迷上了代码!