上一页 1 2 3 4 5 6 7 ··· 16 下一页
  2013年11月8日
摘要: 题目描述 一个无环的有向图称为无环图(Directed Acyclic Graph),简称DAG图。 AOE(Activity On Edge)网:顾名思义,用边表示活动的网,当然它也是DAG。与AOV不同,活动都表示在了边上,如下图所示: 如上所示,共有11项活动(11条边),9个事件(9个顶点)。整个工程只有一个开始点和一个完成点。即只有一个入度为零的点(源点)和只有一个出度为零的点(汇点)。 关键路径:是从开始点到完成点的最长路径的长度。路径的长度是边上活动耗费的时间。如上图所示,1到2到5到7到9是关键路径(关键路径不止一条,请输出字典序最小的),权... 阅读全文
posted @ 2013-11-08 17:27 straw_berry 阅读(2258) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MSMemory Limit:65536KTotal Submissions:16200Accepted:8283DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little man, you need to pay a $1 travel 阅读全文
posted @ 2013-11-08 11:24 straw_berry 阅读(211) 评论(0) 推荐(0) 编辑
  2013年11月6日
摘要: Time Limit:1000MSMemory Limit:10000KTotal Submissions:12123Accepted:5129DescriptionAn integer interval [a,b], a 2 #include 3 #include 4 using namespace std; 5 6 struct node 7 { 8 int s,t; 9 }L[10010];10 int cmp(const struct node &a, const struct node &b)11 {12 return a.t = L[i].s && 阅读全文
posted @ 2013-11-06 20:40 straw_berry 阅读(267) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1502刷一道模板题稳定一下心情。。。Dijkstra求单源最短路,就是输入的时候注意下,是按下三角输入的(无向图),输入字符x表示i与j不通。可以这样输入:if(scanf("%d",&w)) map[i][j] = map[j][i] = w; else scanf("x"); 1 #include 2 #include 3 const int INF = 0x3f3f3f3f; 4 5 int map[110][110],vis[110],dis[110],n; 6 void Dijkst 阅读全文
posted @ 2013-11-06 19:41 straw_berry 阅读(281) 评论(0) 推荐(0) 编辑
  2013年11月5日
摘要: http://poj.org/problem?id=1027题意:给一个10*15的地图,里面填充R,G,B三种颜色,每次找到当前地图的同色最大区域M,并将其删除,删除M后,上面的小球自然下落,当有空列时,空列右边的小球同时向左移动一列, 当最后地图上同色最大区域的小球个数是1或0时,循环结束;注意输出格式,最后输出一个空行。思路:while(true){ 找到同色最大区域,包括其面积Maxsize,坐标,颜色(BFS,手写队列); if (Maxsize == 1 || Maxsize == 0) break; 删除该最大区域,即将map[i][j] 置为0,(BFS,手写队列)... 阅读全文
posted @ 2013-11-05 20:54 straw_berry 阅读(227) 评论(0) 推荐(0) 编辑
  2013年11月3日
摘要: 题目描述Today the first round of the Soccer World Championship in France is coming to an end. 16 countries are remaining now, among which the winner is determined by the following tournament: 1 Brazil -----+ +-- ? --+ 2 Chile ------+ | +-- ? --+ 3 Nigeria ----+ | | ... 阅读全文
posted @ 2013-11-03 21:32 straw_berry 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 题目描述The GNU Compiler Collection (usually shortened to GCC) is a compiler system produced by theGNU Project supporting various programming languages. But it doesn’t contains the math operator “!”.In mathematics the symbol represents the factorial operation. The expression n! means "theproduct of 阅读全文
posted @ 2013-11-03 21:26 straw_berry 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescription 俗话说一分钱难倒英雄汉,高中几年下来,吉哥已经深深明白了这个道理,因此,新年开始存储一年的个人资金已经成了习惯,不过自从大学之后他不好意思再向大人要压岁钱了,只能把唯一的希望放到自己身上。可是由于时间段的特殊性和自己能力的因素,只能找到些零零碎碎的工作,吉哥想知道怎么安排自己的假期才能获得最多的工资。 已知吉哥一共有m天的假期,每天的编号从1到m,一共有n份可以做的工作,每份工作都知道起始时间s,终止时间e和 阅读全文
posted @ 2013-11-03 21:05 straw_berry 阅读(417) 评论(0) 推荐(0) 编辑
摘要: DescriptionProblemATribblesInput:Standard InputOutput:Standard OutputGRAVITATION,n."The tendency of all bodies to approach one another with a strengthproportion to the quantity of matter they contain -- the quantity ofmatter they contain being ascertained by the strength of their tendencyto app 阅读全文
posted @ 2013-11-03 19:29 straw_berry 阅读(291) 评论(0) 推荐(0) 编辑
  2013年10月30日
摘要: http://poj.org/problem?id=3371终于遇到简单一点的模拟题了。不过本人真心没有耐心读题目。。。它的大致意思就是给一段合法的文章,求出这段文章的单词数,句子数,音节数,按照题目给出的公式带入就出结果。>因为输入是按空格作为字符串结束标志的,因此每输入一个字符串就是一个单词,>句子结束的标志是 . ? : ; !五种,每输入一个字符串只须判断其最后一个字符是否是. ? : ; !的一种,若是,句子数加1.>对于音节数,单词长度 2 #include 3 #include 4 #include 5 using namespace std; 6 7 bool 阅读全文
posted @ 2013-10-30 20:19 straw_berry 阅读(624) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页