动态规划+搜索
文章平均质量分 84
LSC_333
此人很懒
展开
-
动态规划——Cutting Sticks
You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery,Inc. (ACM), charges money according to the length of the stick being cut. Their procedure of work原创 2017-07-15 20:20:07 · 586 阅读 · 0 评论 -
动态规划——Coloring Brackets
Once Petya read a problem about a bracket sequence. He gave it much thought but didn't find a solution. Today you will face it.You are given string s. It represents a correct bracket sequence. A cor原创 2017-08-04 16:14:05 · 653 阅读 · 1 评论 -
动态规划——Tour
John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a small plane and starts visiting beautiful places. To save money, John must determine the shortest closed tour that connects h原创 2017-08-05 19:40:11 · 315 阅读 · 0 评论 -
动态规划——巴比伦塔
Perhaps you have heard of the legend of the Tower of Babylon. Nowadays many details of this tale have been forgotten. So now, in line with the educational nature of this contest, we will tell you th原创 2017-09-04 20:34:28 · 353 阅读 · 0 评论 -
动态规划——地铁里的间谍
Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several thrilling events we find her in the first station of Algorithms City Metro, examining the t原创 2017-09-04 16:17:54 · 618 阅读 · 0 评论 -
动态规划——单向 DSP
题目传送门:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=52题意:给一个m行n列的矩阵,现让你从最左边走到最右边,求经过路径上的权值最小,并输出路径和最小值,如果有多条路径的权值和都是最小值,输出字典序最小的那一条走原创 2017-09-06 10:21:41 · 325 阅读 · 0 评论 -
CF_Educational Codeforces Round 28_A
Hideo Kojima has just quit his job at Konami. Now he is going to find a new place to work. Despite being such a well-known person, he still needs a CV to apply for a job.During all his career Hide原创 2017-09-06 15:13:57 · 282 阅读 · 0 评论 -
动态规划——劲歌金曲
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4008题意:给n首歌和一个时间t,最后一首歌必须是劲歌金曲(这首歌的时间是678s),要求t时间内唱的歌的数目最多的前提下使唱的时间最大。01背包问题,只不过决策时有两个条件,原创 2017-09-06 19:44:18 · 393 阅读 · 0 评论 -
动态规划——划分为回文串
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2631题意:输入一个字符串,问最少可以将它划分成多少个回文串。思路:可以设置dp[i]为从第一个字符到第i个字符之间最少可以划分的回文串,然后设1O(n原创 2017-09-07 16:27:44 · 400 阅读 · 0 评论 -
动态规划——Multiplication Puzzle
The 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 points equal to the pr原创 2017-09-25 23:39:00 · 440 阅读 · 0 评论 -
动态规划——免费馅饼
都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝原创 2017-10-21 11:25:15 · 553 阅读 · 0 评论 -
动态规划——AGTC
Let x and y be two strings over some finite alphabet A. We would like to transform x into y allowing only operations given below:Deletion: a letter in x is missing in y at a corresponding positi原创 2017-07-26 20:07:10 · 416 阅读 · 0 评论 -
Crossed Matchings——动态规划
There are two rows of positive integer numbers. We can draw one line segment between any two equal numbers, with values r, if one of them is located in the first row and the other one is located in th原创 2017-07-17 14:22:08 · 651 阅读 · 0 评论 -
动态规划——Relocation 动态规划+状态压缩
Emma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate. To move the furniture, they only have two comp原创 2017-07-15 13:45:38 · 284 阅读 · 0 评论 -
Word Folding
You will receive 5 points for solving this problem.Manao has invented a new operation on strings that is called folding. Each fold happens between a pair of consecutive letters and places the second原创 2017-07-30 18:52:16 · 393 阅读 · 0 评论 -
POJ 3083 Children of the Candy Corn
The cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terrors on their que原创 2017-07-30 19:52:50 · 197 阅读 · 0 评论 -
动态规划——Cake slicing
A rectangular cake with a grid of m*n unit squares on its top needs to be sliced into pieces. Several cherries are scattered on the top of the cake with at most one cherry on a unit square. The slicin原创 2017-08-07 19:04:41 · 529 阅读 · 0 评论 -
动态规划——Happy Matt Friends
Matt has N friends. They are playing a game together. Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of his friends. If the xor (exclusive-or) sum of the原创 2017-08-02 18:45:09 · 357 阅读 · 0 评论 -
动态规划——Warcraft
Have you ever played the Warcraft?It doesn't matter whether you have played it !We will give you such an experience.There are so many Heroes in it,but you could only choose one of them.Each Hero has h原创 2017-08-02 19:50:40 · 314 阅读 · 0 评论 -
动态规划——Compatible Numbers
Two integers x and y are compatible, if the result of their bitwise "AND" equals zero, that is, a & b = 0. For example, numbers 90 (10110102) and 36 (1001002) are compatible, as 10110102 & 1001002 =原创 2017-08-03 18:58:40 · 743 阅读 · 0 评论 -
动态规划——Easy 2048 Again
Dark_sun knows that on a single-track road (which means once he passed this area, he cannot come back again), there are some underground treasures on each area of the road which has the value of 2, 4,原创 2017-07-26 17:19:09 · 415 阅读 · 0 评论 -
动态规划——Dining Cows
The cows are so very silly about their dinner partners. They have organized themselves into three groups (conveniently numbered 1, 2, and 3) that insist upon dining together. The trouble starts when t原创 2017-07-24 14:57:02 · 581 阅读 · 0 评论 -
动态规划——Bubble Sort Graph
Iahub recently has learned Bubble Sort, an algorithm that is used to sort a permutation with n elements a1, a2, ..., an in ascending order. He is bored of this so simple algorithm, so he invents his原创 2017-07-24 14:35:05 · 355 阅读 · 0 评论 -
PAT1 1045 Favorite Color Stripe
题目链接我的github题目大意给两个序列,求两个序列的最大公共子序列(序列中的元素可重复)的长度例如 {2 2 4 1 5 5 6 3 1 1 5 6}和 {2 3 1 5 6}的最大公共子序列(元素可重复)是{2 2 1 1 1 5 6}, {2 2 1 5 5 5 6}, {2 2 1 5 5 6 6}和 {2 2 3 1 1 5 6}输入第一行给一个正整数N≤200N\leq2...原创 2019-06-06 11:10:39 · 167 阅读 · 0 评论