自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 poj 1125

题目简答,考floyd算法。代码如下: #include #include #include #include #define INTMAX 10000 using namespace std; int visit[101]; int path[101][101]; int cons[101][101]; int n; void floyd() { int i,j,k; for(k=0;

2017-03-11 15:34:33 185

原创 poj 2488

又是一道dfs的题目。开始分析题目发现是一道求Graph通路的问题,开始思考用邻接表或矩阵建图,然后通路判断+遍历;后来看分析发现忽略了“字典序排列”,所以需要从A1开始按一定顺序搜索,而且采用dfs算法。代码如下: #include #include #include #include #include #include #include #include #include using nam

2017-03-10 20:59:59 244

转载 poj 2513(字典树等部分借鉴网上代码)

#include #include #include #include #include #include using namespace std; int color=0; int ans[500010]; int deg[500010]={0}; class Tritree { public: int id; bool isword; Tritree *next[26]; Tri

2017-03-08 21:04:53 144

空空如也

空空如也

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

TA关注的人

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