• 博客(0)
  • 资源 (2)

空空如也

强大的ACM经典算法大全

很多算法~很实用/*==================================================*\ | DAG的深度优先搜索标记 | INIT: edge[][]邻接矩阵; pre[], post[], tag全置0; | CALL: dfstag(i, n); pre/post:开始/结束时间 \*==================================================*/ int edge[V][V], pre[V], post[V], tag; void dfstag(int cur, int n) { // vertex: 0 ~ n-1 pre[cur] = ++tag; for (int i=0; i<n; ++i) if (edge[cur][i]) { if (0 == pre[i]) { printf("Tree Edge!\n"); dfstag(i, n); } else { if (0 == post[i]) printf("Back Edge!\n"); else if (pre[i] > pre[cur]) printf("Down Edge!\n"); else printf("Cross Edge!\n"); } } post[cur] = ++tag; }

2010-11-09

MemoryImageSource类用法

关于MemoryImageSourc~讲的比较不错~可以试试看~

2011-05-14

空空如也

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

TA关注的人

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