
ACM_POJ
nirvana · rebirth
NIRVANA & REBIRTH
展开
-
POJ 1840——Eqs、HRBUST 1013——Eqs【哈希】
题目传送门DescriptionConsider equations having the following form:a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0The coefficients are given integers from the interval [-50,50].It is consider a solution a system ...原创 2020-01-17 23:41:07 · 408 阅读 · 0 评论 -
POJ 1273——Drainage Ditches【最大流 & EK算法 & Dinic算法 + 优化】
题目传送门DescriptionEvery time it rains on Farmer John’s fields, a pond forms over Bessie’s favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time ...原创 2019-12-18 15:49:22 · 272 阅读 · 0 评论 -
POJ 1185——炮兵阵地【状压DP & 空间预处理优化】
题目传送门Description司令部的将军们打算在N * M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色...原创 2019-12-18 00:53:34 · 304 阅读 · 0 评论 -
POJ 1703——Find them, Catch them【并查集变形】
题目传送门DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs ...原创 2019-11-26 23:54:17 · 190 阅读 · 0 评论 -
POJ 1818——Buy Tickets【线段树 & 单点更新】
题目传送门DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little...原创 2019-11-19 23:46:47 · 207 阅读 · 0 评论 -
POJ 2486——Apple Tree【树形DP】
题目传送门DescriptionWshxzt is a lovely girl. She likes apple very much. One day HX takes her to an apple tree. There are N nodes in the tree. Each node has an amount of apples. Wshxzt starts her happy ...原创 2019-11-18 23:34:48 · 252 阅读 · 0 评论 -
POJ 1947——Rebuilding Roads【树形背包】
题目传送门DescriptionThe cows have reconstructed Farmer John’s farm, with its N barns (1 <= N <= 150, number 1…N) after the terrible earthquake last May. The cows didn’t have time to rebuild any e...原创 2019-11-18 00:37:28 · 509 阅读 · 0 评论 -
POJ 1155 ——TETE【树形背包】
题目传送门DescriptionA TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits t...原创 2019-11-18 00:00:00 · 220 阅读 · 0 评论 -
POJ 3140——Contestants Division【树形DP & 删边 & 点权树 & 树重心变形】
题目传送门DescriptionIn the new ACM-ICPC Regional Contest, a special monitoring and submitting system will be set up, and students will be able to compete at their own universities. However there’s one ...原创 2019-11-16 11:23:13 · 317 阅读 · 0 评论 -
POJ 2378——Tree Cutting【树形DP & 删边 & 树重心】
题目传送门DescriptionAfter Farmer John realized that Bessie had installed a “tree-shaped” network among his N (1 <= N <= 10,000) barns at an incredible cost, he sued Bessie to mitigate his losses....原创 2019-11-16 11:11:35 · 386 阅读 · 0 评论 -
POJ 3107——Godfather【树状DP & 树的重心】
题目传送门DescriptionLast years Chicago was full of gangster fights and strange murders. The chief of the police got really tired of all these crimes, and decided to arrest the mafia leaders.Unfortunat...原创 2019-11-16 00:04:43 · 406 阅读 · 0 评论 -
POJ 1741——Tree【树形DP & 点分树】
题目传送门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) o...原创 2019-11-15 19:44:26 · 288 阅读 · 0 评论 -
POJ 1655——Balancing Act【树形DP & 树的重心】
题目传送门DescriptionConsider a tree T with N (1 <= N <= 20,000) nodes numbered 1…N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a nod...原创 2019-11-14 20:52:17 · 248 阅读 · 1 评论 -
POJ 1651——Multiplication Puzzle【区间DP & 记忆化搜索】
题目传送门DescriptionThe multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of poi...原创 2019-11-10 11:44:05 · 218 阅读 · 0 评论 -
POJ 1141——Brackets Sequence【区间DP & 打印路径】
题目传送门DescriptionLet us define a regular brackets sequence in the following way:Empty sequence is a regular sequence.If S is a regular sequence, then (S) and [S] are both regular sequences.If A ...原创 2019-11-03 11:30:19 · 251 阅读 · 0 评论 -
POJ 2955——Brackets【区间DP】
题目传送门DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s) and [s]...原创 2019-11-02 23:55:57 · 278 阅读 · 0 评论 -
POJ 1080—— Human Gene Functions【LCS变形】( 好题! )
题目传送门DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been in...原创 2019-11-02 11:01:40 · 514 阅读 · 0 评论 -
POJ 1239—— Increasing Sequences【严格递增子序列】
题目传送门两次DPDescriptionGiven a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of the last number. For this problem, leading zeros ...原创 2019-10-31 20:17:40 · 1287 阅读 · 1 评论 -
POJ 1837——Balance【分组背包】
题目传送门平衡问题,把每个砝码在每个位置的权值算出来,每个砝码一个分组,几个位置几个物品,最后求的是价值和为0的方案数。DescriptionGigel has a strange “balance” and he wants to poise it. Actually, the device is different from any other ordinary balance.It...原创 2019-10-29 23:38:08 · 350 阅读 · 0 评论 -
POJ 2392——Space Elevator【多重背包 & 二进制优化 & 贪心】
题目传送门DescriptionThe cows are going to space! They plan to achieve orbit by building a sort of space elevator: a giant tower of blocks. They have K (1 <= K <= 400) different types of blocks wi...原创 2019-10-28 23:54:22 · 237 阅读 · 0 评论 -
POJ 2063 —— Investment【完全背包】
题目传送门求投资k年获得最大投资,每年都选最大利息的方案进行投资k年后就可以得到最多的人民币。DescriptionJohn never knew he had a grand-uncle, until he received the notary’s letter. He learned that his late grand-uncle had gathered a lot of mo...原创 2019-10-26 14:38:24 · 268 阅读 · 0 评论 -
POJ 2184——Cow Exhibition【01背包、负值】
题目传送门变形的01背包,其实问题的本质是保证智商和幽默感和不为负数情况下的最大和。智商属性体积,幽默感属性为价值,问题转换为求体积大等于0时的体积、价值总和。Description“Fat and docile, big and dumb, they look so stupid, they aren’t muchfun…”Cows with Guns by Dana Lyons...原创 2019-10-25 00:14:03 · 243 阅读 · 0 评论