自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(5)
  • 收藏
  • 关注

原创 简单的拓扑排序(POJ2367)

<br />链接:http://poj.org/problem?id=2367<br /> <br />代码:<br />#include <iostream> #include <vector> using namespace std; struct Vertex { vector<int> adjacent; int adjNum; int indegree; Vertex(): indegree(0),adjNum(0) { } }; struct Graph {

2010-12-22 14:24:00 360

原创 照葫芦画瓢的BFS,poj3278

<br />链接:http://poj.org/problem?id=3278<br /> <br />代码:<br />#include <iostream> #include <queue> #include <cstring> using namespace std; const int MAX_POINTS_NUM = 110000; const int INFINITY = 110000; int d[MAX_POINTS_NUM]; int BFS(int s,int e) {

2010-12-11 17:01:00 274

原创 写的很烂的DFS,POJ1979

<br />链接:http://poj.org/problem?id=1979<br /> <br />代码:#include <iostream> using namespace std; #define RED 2 #define EXPLORED 1 #define UNEXPLORED 3 int room[21][21]; int res = 0; void DFS(int sizeY,int sizeX,int y,int x) { if(y>=sizeY || y<0 |

2010-12-10 12:51:00 247

原创 邻接数组Prim(POJ1287)

<br />链接:http://poj.org/problem?id=1287 <br /> <br />代码(C++)#include <stdio.h> int adjMatrix[100][100]; const int MAXLEN = 1000; bool known[100]; int dv[100]; void initGraph(int,int); int smallestUnkownVertex(int); int prim(int); void initGrap

2010-12-09 15:35:00 290

原创 第一次Prim,POJ1251

链接:http://poj.org/problem?id=1251代码(C++):#include using namespace std; struct AdjNode; struct Vertex { char name; int numOfAdj; AdjNode *firstAdj; }; struct AdjNode { char name; int dis; AdjNode *nextAdj; }; struct Graph {

2010-12-09 14:10:00 314

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除