----------图算法----------
Detective-Conan
且随疾风前行 身后亦须留心
展开
-
(模板题)loj #127. 最大流 加强版(hlpp)
题目链接:https://loj.ac/problem/127最大流hlpp模板(原作者是xehoth,我就改了改拿来用用)请根据题目要求做修改。Note:可将vector改为链式前向星,代码我就不贴出来了,如有需要请私信我。update(2018.9.29):算是对这个板子的总结。在检验板子的时候发现这个东西跑网络流时间下限较高,但上限小,适合跑边数多的图,毕竟O(),时...原创 2018-08-24 16:14:07 · 1329 阅读 · 0 评论 -
(模板题)poj 3308 Paratroopers(Dinic算法最大流)
ParatroopersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8481 Accepted: 2554DescriptionIt is year 2500 A.D. and there is a terrible war between the f原创 2016-10-29 14:26:35 · 406 阅读 · 0 评论 -
poj 3686 The Windy's
The Windy'sTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 5111 Accepted: 2135DescriptionThe Windy's is a world famous toy factory that owns M top-class原创 2016-11-09 20:42:27 · 221 阅读 · 0 评论 -
poj 2400 Supervisor, Supervisee
Supervisor, SuperviseeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2732 Accepted: 765DescriptionSuppose some supervisors each get to hire a new perso原创 2016-11-07 20:26:26 · 381 阅读 · 0 评论 -
poj 3422 Kaka's Matrix Travels
Kaka's Matrix TravelsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9453 Accepted: 3840DescriptionOn an N × N chessboard with a non-negative number in原创 2016-09-29 20:42:10 · 257 阅读 · 0 评论 -
poj 3352 Road Construction
Road ConstructionTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11240 Accepted: 5592DescriptionIt's almost summer time, and that means that it's almost原创 2016-10-22 12:04:57 · 289 阅读 · 0 评论 -
poj 3155 Hard Life
Hard LifeTime Limit: 8000MS Memory Limit: 65536KTotal Submissions: 8495 Accepted: 2468Case Time Limit: 2000MS Special JudgeDescriptionJohn is a Chief原创 2016-11-06 17:42:44 · 254 阅读 · 0 评论 -
sdut 3363 数据结构实验之图论七:驴友计划
数据结构实验之图论七:驴友计划Time Limit: 1000MS Memory Limit: 65536KBSubmit Statistic DiscussProblem Description做为一个资深驴友,小新有一张珍藏的自驾游线路图,图上详细的标注了全国各个城市之间的高速公路距离和公路收费情况,现在请你编写一个程序,找出一条出发地到目的地之间的最短路径,如原创 2016-11-04 18:51:34 · 1544 阅读 · 0 评论 -
poj 1094 Sorting It All Out
Sorting It All OutTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 32696 Accepted: 11362DescriptionAn ascending sorted sequence of distinct values is one原创 2016-07-30 17:08:39 · 316 阅读 · 0 评论 -
sdut 2144 图结构练习——最小生成树
数据结构实验之图论七:驴友计划Time Limit: 1000MS Memory Limit: 65536KBSubmit Statistic DiscussProblem Description做为一个资深驴友,小新有一张珍藏的自驾游线路图,图上详细的标注了全国各个城市之间的高速公路距离和公路收费情况,现在请你编写一个程序,找出一条出发地到目的地之间的最短路径,如原创 2016-11-04 15:34:59 · 379 阅读 · 0 评论 -
poj 2195 Going Home(二分图最优匹配KM算法)
Going HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 21805 Accepted: 11032DescriptionOn a grid map there are n little men and n houses. In each uni原创 2016-09-27 08:46:13 · 370 阅读 · 0 评论 -
poj 3592 Instantaneous Transference
Instantaneous TransferenceTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 6523 Accepted: 1474DescriptionIt was long ago when we played the game Red Aler原创 2016-10-20 11:17:32 · 257 阅读 · 0 评论 -
poj 3694 Network
NetworkTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 9123 Accepted: 3390DescriptionA network administrator manages a large network. The network consis原创 2016-10-06 19:30:07 · 263 阅读 · 0 评论 -
Gym - 101755F F. Tree Restoration
F. Tree Restorationtime limit per test:2.0 smemory limit per test:256 MBinput:standard inputoutput:standard outputThere is a tree of n vertices. For each vertex a list of all its successors ...原创 2018-08-06 21:41:40 · 302 阅读 · 0 评论 -
HDU 6201 transaction transaction transaction
transaction transaction transactionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 284 Accepted Submission(s): 125Problem D原创 2017-09-10 21:51:01 · 979 阅读 · 2 评论 -
HDU 6165 FFF at Valentine
FFF at ValentineTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 159 Accepted Submission(s): 72Problem DescriptionAt Val原创 2017-08-22 19:43:01 · 1075 阅读 · 0 评论 -
HDU 6181 Two Paths
Two PathsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 153428/153428 K (Java/Others)Total Submission(s): 110 Accepted Submission(s): 70Problem DescriptionYou are given a undir原创 2017-08-24 21:27:09 · 348 阅读 · 0 评论 -
2017 计蒜客复赛 D.百度地图导航
AC率:17.24% 时限:1000ms 内存限制:131072K百度地图上有 n 个城市,城市编号依次为 1 到 n。地图中有若干个城市群,编号依次为 1 到 m。每个城市群包含一个或多个城市;每个城市可能属于多个城市群,也可能不属于任何城市群。地图中有两类道路。第一类道路是 城市之间的快速路,两个城市 u,v 之间增加一条距离为 c 的边;第二类道路是 城市群之间的高速路,连接原创 2017-06-10 20:49:04 · 369 阅读 · 0 评论 -
FZU 2254 英语考试
Problem 2254 英语考试 Accept: 88 Submit: 218Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description在过三个礼拜,YellowStar有一场专业英语考试,因此它必须着手开始复习。这天,YellowStar准备了n个需要背的单词,每原创 2017-07-25 10:24:52 · 399 阅读 · 0 评论 -
poj 2942 Knights of the Round Table
Knights of the Round TableTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 12277 Accepted: 4058DescriptionBeing a knight is a very attractive career: sea原创 2016-10-02 17:54:04 · 345 阅读 · 0 评论 -
poj 1860 Currency Exchange
Currency ExchangeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 26355 Accepted: 9736DescriptionSeveral currency exchange points are working in our city原创 2016-07-28 13:39:11 · 231 阅读 · 0 评论 -
(模板题)sdut 3362 数据结构实验之图论六:村村通公路(prim求最小生成树)
数据结构实验之图论六:村村通公路Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述当前农村公路建设正如火如荼的展开,某乡镇政府决定实现村村通公路,工程师现有各个村落之间的原始道路统计数据表,表中列出了各村之间可以建设公路的若干条道路的成本,你的任务是根据给出的数据表,求使得每个村都有公路原创 2016-07-23 14:24:14 · 534 阅读 · 0 评论 -
PTA 5-14 周游世界 (2017cccc初赛L3-2)
5-14 周游世界 (30分)周游世界是件浪漫事,但规划旅行路线就不一定了…… 全世界有成千上万条航线、铁路线、大巴线,令人眼花缭乱。所以旅行社会选择部分运输公司组成联盟,每家公司提供一条线路,然后帮助客户规划由联盟内企业支持的旅行路线。本题就要求你帮旅行社实现一个自动规划路线的程序,使得对任何给定的起点和终点,可以找出最顺畅的路线。所谓“最顺畅”,首先是指中途经停站最少;如果原创 2017-03-30 22:14:01 · 2805 阅读 · 0 评论 -
poj 2516 Minimum(SPFA解决最小费用最大流)
Minimum CostTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 16007 Accepted: 5614DescriptionDearboy, a goods victualer, now comes to a big problem, and h原创 2016-09-26 19:10:47 · 313 阅读 · 0 评论 -
poj 3114 Countries in War
Countries in WarTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3675 Accepted: 1060DescriptionIn the year 2050, after different attempts of the UN to原创 2016-10-21 11:31:52 · 255 阅读 · 0 评论 -
poj 1364 King
KingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12431 Accepted: 4511DescriptionOnce, in one kingdom, there was a queen and that queen was expecting原创 2016-09-21 22:04:07 · 252 阅读 · 0 评论 -
poj 3020 Antenna Placement
Antenna PlacementTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8561 Accepted: 4238DescriptionThe Global Aerial Research Centre has been allotted the t原创 2016-07-31 16:50:55 · 310 阅读 · 0 评论 -
(模板题)poj 3041 Asteroids(二分图的最大匹配匈牙利算法)
AsteroidsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20143 Accepted: 10929DescriptionBessie wants to navigate her spaceship through a dangerous aste原创 2016-07-31 12:15:20 · 318 阅读 · 0 评论 -
poj 2485 Highways
HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 28289 Accepted: 12882DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately,原创 2016-07-29 17:07:01 · 360 阅读 · 0 评论 -
poj 3026 Borg Maze
Borg MazeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12608 Accepted: 4121DescriptionThe Borg is an immensely powerful race of enhanced humanoids fro原创 2016-07-29 21:14:14 · 375 阅读 · 0 评论 -
poj 1258 Agri-Net
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 51418 Accepted: 21436DescriptionFarmer John has been elected mayor of his town! One of his campa原创 2016-07-29 17:33:38 · 251 阅读 · 0 评论 -
poj 2240 Arbitrage
ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20476 Accepted: 8719DescriptionArbitrage is the use of discrepancies in currency exchange rates原创 2016-07-29 14:13:36 · 191 阅读 · 0 评论 -
poj 1125 Stockbroker Grapevine
Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 33785 Accepted: 18652DescriptionStockbrokers are known to overreact to rumours. You原创 2016-07-29 13:00:54 · 323 阅读 · 0 评论 -
poj 1062 昂贵的聘礼
昂贵的聘礼Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 45090 Accepted: 13326Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给原创 2016-07-29 10:01:02 · 270 阅读 · 0 评论 -
poj 3259 Wormholes
WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 43633 Accepted: 16020DescriptionWhile exploring his many farms, Farmer John has discovered a nu原创 2016-07-28 20:35:00 · 215 阅读 · 0 评论 -
sdut 2622 最短路径(Dijkstra算法求最短路)
最短路径Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述为了准备一年一度的校赛,大家都在忙着往赛场搬运东西,比如气球什么的。这时 YY 也没有闲着,他也加入了搬运工的行列。已知学校有 N 个路口和 M 条路,YY 并不是把东西直接搬到赛场,而是从 S 路口搬运到 T 路口。由于 Y原创 2016-07-19 09:59:43 · 1094 阅读 · 2 评论 -
poj 2253 Frogger
FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 36865 Accepted: 11852DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Sudden原创 2016-07-29 11:15:56 · 311 阅读 · 0 评论 -
(模板题)poj 1459 Power Network(Edmonds-Karp算法求最大流)
Power NetworkTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 26991 Accepted: 14034DescriptionA power network consists of nodes (power stations, consumer原创 2016-08-01 09:06:05 · 520 阅读 · 0 评论 -
poj 1275 Cashier Employment
Cashier EmploymentTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7878 Accepted: 3001DescriptionA supermarket in Tehran is open 24 hours a day every day原创 2016-09-21 20:45:26 · 295 阅读 · 0 评论 -
(模板题)poj 1716 Integer Intervals(差分约束系统)
Integer IntervalsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14114 Accepted: 5988DescriptionAn integer interval [a,b], a Write a program that: fin原创 2016-09-12 15:01:25 · 379 阅读 · 0 评论