- 博客(28)
- 资源 (1)
- 收藏
- 关注
原创 HDU3371 Connect the Cities
思考:用G++ TLE, 用C++ AC。#include #include #include #include using namespace std;const int maxn = 510;int gn, gm;//Accepted 3371 906MS 1088K 1336 B C++ //Accepted 3371 875MS 1088K 1471 B C++ s
2014-03-23 13:37:37 793
转载 POJ 1182 食物链
思考: 首先我感觉这道题目不容易的地方就是表示三种物种的相对关系,以及关系之间的相互转化,更新。看了一个网友分享的思路,感觉很不错。#include #include #include #include using namespace std;const int maxn = 50010;//动物个数的最大值///指明父节点与自己的关系,0同类,1被吃,2吃父const int
2014-03-21 16:12:20 568
转载 2014网易运营工程师笔试题
网易运维工程(邮件运维) 日期:2013-09-23第一部分:计算机科学基础1,(2分)对于多关键字而言,那种文件组织方便而又高效()A、顺序文件 B、倒排文件 C、散列文件 D、B+树索引文件2,(2分)以下哪些算法可用于遍历网络图()A、广度优先搜索 B、深度优先搜索 C、线性规划策略 D、决策树3,(2分)我们使用一个6元组来表示6个节点的无向图的顶点数
2014-03-19 17:26:51 1931
原创 hdu1232 畅通工程
#include #include #include #include using namespace std;const int maxn = 1000;int f[maxn+10];int getFather(int x) { if(x == f[x]) return x; else return f[x] = getFather(f[x]);}int gn, gm
2014-03-19 08:30:37 853
转载 树的最大独立集 (算法经典入门)
思考:看过算法经典入门再看看网上的这个程序就是一种享受啊!禁不住转载,我还在树上的动态规划入门阶段。。。加油!#include #include #include #include using namespace std;const int MAXN=100;vector G[MAXN]; //无根树int l[MAXN]; //结点层次int p[MAXN]; //根树i
2014-03-13 20:52:36 3089
转载 url
推荐一篇在 eclipse 中 java web 链接数据库的文章。http://www.cnblogs.com/fnng/archive/2011/07/18/2110023.html
2014-03-12 12:39:07 653
原创 poj2141 Message Decowding
此题目练习编码的,C++用gets()函数会有警告哦。#include #include #include #include const int maxn = 90;char str[30];char read[maxn];void work(){ int len = strlen(read); for(int i = 0; i < len; i++) { if(re
2014-03-11 15:56:43 802
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人