码迷,mamicode.com
首页 >  
搜索关键字:const char p    ( 57984个结果
康托展开
康托展开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
杭电oj 1002
1 #include 2 #include 3 using namespace std; 4 int nCases; 5 int m[1001], n[1001]; 6 char a[1001], b[1001]; 7 int main() 8 { 9 scanf("%d", &nCa...
分类:其他好文   时间:2014-05-10 05:14:19    阅读次数:342
LeetCode--Reverse Integer
//#include #include #include //using namespace std; //const int MAXN=10; //int Stack[MAXN]; stack s; class Solution { public: int getNumber(int x) { //int lengthOfStack=0;...
分类:其他好文   时间:2014-05-10 04:45:29    阅读次数:231
n进制转为十进制
主程序代码 - 1 #include 2 #include 3 main() 4 { 5 long t1; 6 int i, n, t, t3; 7 char a[100]; 8 printf("please input a number string:\n");...
分类:其他好文   时间:2014-05-10 03:10:56    阅读次数:269
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
·专题」 KMP
KMP 总结1.strstr函数|函数名: strstr|功 能: 在串中查找指定字符串的第一次出现 |用 法: char *strstr(char *str1, char *str2);|据说strstr和KMP的算法效率差不多|注意:返回的是该字符串第一次出现时的指针,所以如果要计算下标,可以用...
分类:其他好文   时间:2014-05-10 02:59:16    阅读次数:409
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
C语言之关键字
1. C99标准规定了如下关键字:auto _Bool break case char _Complexconst continue default restrict do ...
分类:编程语言   时间:2014-05-10 02:27:27    阅读次数:422
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!