
swust summer train graph theor
Yyyy_H
弱鸡。
展开
-
B - A Bug's Life
B - A Bug's LifeTime Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionBackground Professor Hopper is researching the sexual behavior原创 2015-07-30 21:03:48 · 461 阅读 · 0 评论 -
C - Segment set
C - Segment setTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionA segment and all segments which are connected with it compose a原创 2015-07-30 21:08:47 · 379 阅读 · 0 评论 -
A - 食物链
/*做过很多次的题,主要是运用了带权并查集的思想,就是在保存集合的同时用另外一个数组来记录关系。对于这道题中,使用rela[x]来表示x和它的最远的父亲(该并查集的老大)的关系,如果rela[x] == 0则表示为同类,如果rela[x] == 1则表示x要吃他的最远的父亲,如果rela[x] == 2则表示x要被他最远的父亲吃掉。至于转换的关系可以使用向量来推算。*/#include"i原创 2015-07-30 20:58:42 · 325 阅读 · 0 评论 -
D - Machine Schedule
D - Machine ScheduleTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionAs we all know, machine scheduling is a very classical problem i原创 2015-07-31 11:18:51 · 412 阅读 · 0 评论 -
U - 方格取数(1)
U - 方格取数(1)Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription给你一个n*n的格子的棋盘,每个格子里面有一个非负数。 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2原创 2015-08-01 09:32:39 · 452 阅读 · 0 评论 -
N - PIGS
N - PIGSTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionMirko works on a pig farm that consists of M locked pig-houses and Mirko原创 2015-08-03 11:11:22 · 363 阅读 · 0 评论 -
I - 奔小康赚大钱
I - 奔小康赚大钱Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间原创 2015-08-03 15:42:47 · 558 阅读 · 1 评论