
POJ
文章平均质量分 67
Sdywolf
沃是一只蒟蒻
展开
-
A*与K短路
A*算法一般的搜索有两种:BFS或DFS。这两种搜索都有一个特点,就是搜索顺序与每个节点与起点的距离有关,但是,这样搜索的节点很多是没有必要的,在现实中,我们在走下一步时,还要考虑下一步到终点的距离,A∗A*算法就是在普通的BFS中加一个估价函数,对下一步到终点的距离进行估计,优先搜索到起点的距离与到终点距离的估价值的和小的节点,设想一下,如果估价函数就是当前点到终点的距离,那么这个搜索每一步走的都原创 2017-06-30 09:08:45 · 1203 阅读 · 0 评论 -
【差分约束系统】POJ 1201--Intervals
DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, …, cn. Write a program that: reads the number of intervals, their end points and integers c1, …, cn from the standar原创 2017-07-04 21:55:24 · 486 阅读 · 0 评论 -
楼教主男人八题--POJ1741--点分治
DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. Give an integer k,for every pair (u,v) of ver原创 2017-04-18 20:51:15 · 547 阅读 · 0 评论 -
POJ1741--Tree[平衡树]
利用启发式合并的优良性质实现可靠的暴力原创 2017-03-27 19:29:12 · 818 阅读 · 1 评论 -
POJ2761-Treap
DescriptionWind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed the dogs every day for Wind. Jiajia loves Wind, but not the dogs, so Jiajia use a special way to feed the dogs原创 2017-03-14 20:16:55 · 445 阅读 · 0 评论 -
poj 1275--Cashier Employment【差分约束系统】
题目描述德黑兰的一家每天24小时营业的超市,需要一批出纳员来满足它的需求。超市经理雇佣你来帮他解决一个问题————超市在每天的不同时段需要不同数目的出纳员(例如,午夜只需一小批,而下午则需要很多)来为顾客提供优质服务,他希望雇佣最少数目的纳员。 超市经历已经提供一天里每一小时需要出纳员的最少数量————R(0),R(1),…,R(23)。R(0)表示从午夜到凌晨1:00所需原创 2017-07-05 14:51:54 · 647 阅读 · 0 评论