
POJ
文章平均质量分 81
努力过
喜欢coding
展开
-
poj The Unique MST【判断唯一最小生成树】
DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a su...原创 2018-05-15 17:44:41 · 422 阅读 · 0 评论 -
uva 11882 C - Biggest Number 【最优性剪枝】【深搜】
题意:给定一个n*m的矩阵,'#'表示不能通过,每个方格只能走过一次且下一步只能走上下左右四个方向,问,能够组成最大连续的数字为多大?思路:最优性剪枝即当前所搜索到的结点的后续最优情况也不比当前最优情况好,就停止对当前结点的搜索,回溯到其父亲结点,搜索其它情况。这里用到了两个剪枝,一个是当前已搜索到的数字长度+后续能搜索到的数字长度小于最优值时,直接剪枝;另一个是长度相等时,判断字典序大小,前者较...原创 2018-05-08 15:38:32 · 486 阅读 · 0 评论 -
poj3687 Labeling Balls【反向建图拓扑排序】
DescriptionWindy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that: No two balls share the same label.The labeling satisfies several con...原创 2018-04-13 20:53:03 · 270 阅读 · 0 评论 -
poj1094 Sorting It All Out 【拓扑排序】
DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A,...原创 2018-04-13 13:49:28 · 236 阅读 · 1 评论 -
poj 3461 【KMP求模式串在匹配串中的出现次数 】
OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 46123 Accepted: 18388DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. H...原创 2018-04-12 19:26:30 · 1163 阅读 · 0 评论 -
poj 3254 Corn Fields【状态压缩dp】【入门第一题~~】
Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 17938 Accepted: 9447DescriptionFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12)...原创 2018-02-10 15:40:27 · 290 阅读 · 0 评论 -
poj1486 G - Sorting Slides【二分匹配唯一边】【第三周练习】【the fifth day】
原创 2018-02-05 22:51:03 · 216 阅读 · 0 评论 -
poj 1062 F - Best Deal【dijstra】【第三周练习】【the third day】
Tom, a young explorer, visited an Indian tribe and fell in love with the Chief's daughter. Tom asked the Chief to marry his daughter to him. But the Chief would accept his proposal only if he could pr原创 2018-02-03 12:29:15 · 205 阅读 · 0 评论 -
poj3083 Children of the Candy Corn【bfs+dfs】【刷题计划】
Children of the Candy CornTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14452 Accepted: 6233DescriptionThe cornfield maze is a popular H原创 2017-12-30 17:50:05 · 829 阅读 · 0 评论 -
poj 3295 Tautology【构造法】【刷题计划】
TautologyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13580 Accepted: 5214DescriptionWFF 'N PROOF is a logic game played with dice. Eac原创 2017-12-29 15:46:16 · 751 阅读 · 0 评论 -
poj 2488 A Knight's Journey 【dfs】【字典序】【刷题计划】
A Knight's JourneyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 47516 Accepted: 16161DescriptionBackground The knight is getting bored原创 2017-11-27 12:53:06 · 222 阅读 · 0 评论 -
poj 1573 Robot Motion 【模拟】【刷题计划】
Robot MotionTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14641 Accepted: 7032DescriptionA robot has been programmed to follow the i原创 2017-11-22 14:14:45 · 284 阅读 · 0 评论 -
poj 2632 Crashing Robots【模拟】【略坑~】【刷题计划】
Crashing RobotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11233 Accepted: 4753DescriptionIn a modernized warehouse, robots are used t原创 2017-11-21 18:42:08 · 305 阅读 · 0 评论 -
poj1068 Parencodings【模拟】【刷题计划】
ParencodingsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 27375 Accepted: 16094DescriptionLet S = s1 s2...s2n be a well-formed string of原创 2017-11-18 15:31:21 · 362 阅读 · 0 评论 -
poj 2586 Y2K Accounting Bug【贪心】【刷题计划】
Y2K Accounting BugTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16154 Accepted: 8111DescriptionAccounting for Computer Machinists (ACM)原创 2017-11-16 17:08:08 · 558 阅读 · 0 评论 -
poj2109 Power of Cryptography【坑~泪目】【水过~】【刷题计划】
Power of CryptographyTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 26249 Accepted: 13121DescriptionCurrent work in cryptography involves原创 2017-11-16 13:20:59 · 391 阅读 · 0 评论 -
poj 1328 Radar Installation【贪心】【刷题计划】
Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 93433 Accepted: 20855DescriptionAssume the coasting is an infinite strai原创 2017-11-12 20:28:38 · 457 阅读 · 0 评论 -
poj 2965 The Pilots Brothers' refrigerator 【dfs+枚举】【双十一大礼包】【刷题计划】
The Pilots Brothers' refrigeratorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 27522 Accepted: 10625 Special JudgeDescriptionThe原创 2017-11-11 16:07:10 · 278 阅读 · 0 评论 -
poj1753Flip Game【刷题计划】
Flip GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 47766 Accepted: 20383DescriptionFlip game is played on a rectangular 4x4 field wi原创 2017-11-04 19:43:42 · 509 阅读 · 0 评论 -
B - Radar Installation poj 1328【贪心】
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the原创 2017-09-04 22:28:59 · 317 阅读 · 0 评论 -
poj 1753【枚举+dfs(位向量法)】
Flip GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 46519 Accepted: 19915DescriptionFlip game is played on a rectangular 4x4 field wi原创 2017-08-30 11:00:03 · 341 阅读 · 0 评论 -
【练习赛补题】poj 3026 Borg Maze 【bfs+最小生成树】【坑~】
DescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg原创 2017-08-19 10:30:30 · 285 阅读 · 0 评论 -
【练习赛2补题】poj 2325 Persistent Numbers 【高精度除法+贪心】
DescriptionThe multiplicative persistence of a number is defined by Neil Sloane (Neil J.A. Sloane in The Persistence of a Number published in Journal of Recreational Mathematics 6, 1973, pp. 97-98原创 2017-08-18 22:12:46 · 465 阅读 · 0 评论 -
【练习赛补题】poj1426 【同余定理】【有趣~】
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 33882 Accepted: 14173 Special JudgeDescriptionGiven a positive in原创 2017-08-18 10:29:56 · 343 阅读 · 0 评论 -
【并查集入门专题1】poj1182【带权值的并查集】【思维思维~~】
食物链Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类。 第二种说法是"2 X Y",表示X原创 2017-08-16 17:56:47 · 294 阅读 · 0 评论 -
【并查集入门专题1】E - The Suspects poj1611【并查集模板】
Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to s原创 2017-08-16 14:44:45 · 273 阅读 · 0 评论 -
【并查集入门专题1】A+B+D 三道模板题 hdu1232 hdu1233 poj2524【并查集模板】
~~~~连续三道水题,也只能用提高手速这样理由来安慰自己了,不过,从d题数组超限自己改为边存边合并的方法看来还是有收获吧,只能这样强行“收获了”(泪目)某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?原创 2017-08-15 22:02:45 · 295 阅读 · 0 评论 -
【二分图匹配入门专题1】poj3686 【km+思维建图】
The Windy'sDescriptionThe Windy's is a world famous toy factory that owns M top-class workshop to make toys. This year the manager receives N orders for toys. The manager knows that every原创 2017-08-15 16:55:15 · 242 阅读 · 2 评论 -
【二分匹配入门专题1】P - Ants poj2565【km----卡精度】
Young naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees. Each ant colony needs its own apple tree to feed itself.Bill has a map with coordinates of n ant原创 2017-08-15 08:26:01 · 378 阅读 · 0 评论 -
【二分匹配入门专题1】G - Asteroids poj3041【最小顶点覆盖】
Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 Fortunately, Bessie has a powerful weapon that can vaporize all the asteroids in any give原创 2017-08-13 13:20:45 · 265 阅读 · 0 评论 -
【二分图匹配入门专题1】F - COURSES poj1469【最大匹配--匈牙利算法模板题】
Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P students that sa原创 2017-08-13 06:40:35 · 349 阅读 · 0 评论 -
【字符串入门专题1】F - Seek the Name, Seek the Fame poj2752【kmp】
Seek the Name, Seek the FameDescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies.原创 2017-08-09 17:19:10 · 263 阅读 · 0 评论 -
【最短路入门专题1】H - Frogger poj2253【dijkstra】
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sun原创 2017-08-07 07:27:31 · 455 阅读 · 0 评论 -
【最短路入门专题1】D - MPI Maelstrom poj1502【dijkstra】
BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research ad原创 2017-08-06 22:46:46 · 237 阅读 · 0 评论 -
【最短路入门专题1】E - Heavy Transportation Poj 1797【Dijkstra变形题】
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cu原创 2017-08-06 16:42:03 · 336 阅读 · 0 评论 -
【最短路径入门专题1】K - Wormholes POJ3259 【SPFA】【Bellman-Ford】
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that i原创 2017-08-05 23:51:29 · 262 阅读 · 0 评论 -
poj 1014 Dividing 【多重背包】
DividingDescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if a原创 2017-07-27 15:44:42 · 406 阅读 · 0 评论