- 博客(4)
- 资源 (3)
- 收藏
- 关注
原创 快速幂和快速矩阵
#include using namespace std; #include const int INF=3; typedef struct node { int m[INF][INF]; }Matrix; Matrix P={2,3,4,4,5,6,4,5,3}; Matrix I={1,0,0,0,1,0,0,0,1}; Matrix multy(Matrix a,
2016-01-27 15:22:34 252
原创 KMP算法
KMP算法 #include #include #include using namespace std; const int INF=0x7fff; int p[INF]; //ababacb // void findB(string str) { int len=str.length(); string strcopy(len+1,0); strco
2016-01-26 14:32:07 257
原创 Prime最小生成树
#include #include #include using namespace std; int graph[8][8]; #include bool visited[8]; int dis[8]; int pre[8]; const int minn=127; void prim(int n) { memset(visited,false,s
2016-01-24 12:07:05 343
原创 SPFA随手写,容易理解的
对应的图是 // spfa.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include using namespace std; int graph[8][8]; #include bool v
2016-01-23 20:32:44 250
矩阵连乘的C++代码
2013-02-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人