- 博客(4)
- 资源 (8)
- 收藏
- 关注
原创 幂运算
#include// x^nint pow(int x,int n){ if (x == 0) return 0; if (n == 0) return 1; if(n%2==0) return pow(x*x,n/2); return x*pow(x*x,n/2);}// (x^n)%mint powmod(int
2012-11-01 22:50:33
222
原创 最长公共子序列
#include#includeint max(int a,int b){ return a>b?a:b;}int m[1000][1000];int LCS(char *x,char *y){ int i,j,xs=strlen(x),ys=strlen(y); for(i=1; i <= xs; ++i) for(j=1; j <= y
2012-10-03 14:15:54
284
原创 最长公共子串
#include#includeint m[1000][1000];char* LCS(char *x,char *y){ int i,j,LCS_MAXLEN=0,lx,ly,Pos_x; for(i=1,lx=strlen(x),ly=strlen(y); i<=lx; i++) for(j=1; j<=ly; j++) {
2012-10-03 14:13:25
214
原创 单链表的基本操作
/** 单链表的基本操作*/#include#includetypedef int DataType;typedef struct node{ DataType data; struct node *next;} node, *LinkList;/** 创建空表:*/void Init_List(LinkList *L){ *L=(Li
2012-10-03 14:02:57
395
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅