随笔分类 - 算法->DP
一些没有什么特定类别的dp
    
摘要:题解 看了一眼觉得是求出图对图统计完美匹配的个数(可能之前做过这样模拟题弃疗了,一直心怀恐惧。。。 然后说是统计一下每种匹配出现的概率,也就是,当前左边点匹配状态为S,右边点匹配状态为T,每种匹配出现的概率的总和作为$f[S][T]$,我们需要的就是$f[2^{n} 1][2^{n} 1]$ 然而,
        阅读全文
                
摘要:题解 神仙dp啊 include include include include include // define ivorysi define pb push_back define eps 1e 12 define space putchar(' ') define enter putchar
        阅读全文
                
摘要:C Same Integers 题解 要么三个都达到最大的数,要么三个都到达最大的数+1,判断是前一种情况的方法是不断垫高前两大的,看之后最小的那个和最大的那个差值是不是2的倍数 否则就是第二种情况 代码 cpp include include include include include inc
        阅读全文
                
摘要:C K th Substring 题解 找出第K大的子串,重复的不计入 这个数据范围可能有什么暴力可以艹过去吧,但是K放大的话这就是后缀自动机板子题啊= = 代码 D Equals 题解 给出可交换的两个位置,和一个排列,求最后能达成pi = i的位置 直接用并查集维护连通性,判一下这个位置上的数和
        阅读全文
                
摘要:A square township has been divided up into N2 square plots (1 <= N <= 7). The Farm is located in the upper left plot and the Market is located in the 
        阅读全文
                
摘要:A Rectangular Barn Ever the capitalist, Farmer John wants to extend his milking business by purchasing more cows. He needs space to build a new barn f
        阅读全文
                
摘要:Postal Vans Tiring of their idyllic fields, the cows have moved to a new suburb. The suburb is a rectangular grid of streets with a post office at its
        阅读全文
                
摘要:In order to teach her young calvess the order of the letters in the alphabet, Bessie has come up with a game to play with them. The calves are given a
        阅读全文
                
摘要:This problem requires you to write a program that performs character recognition. Each ideal character image has 20 lines of 20 digits. Each digit is 
        阅读全文
                
摘要:You have won a contest sponsored by an airline. The prize is a ticket to travel around Canada, beginning in the most western point served by this airl
        阅读全文
                
摘要:摩天大楼(dom.pas/c/cpp)题目大意在数轴上有 N 栋摩天大楼,第 i 栋的位置为 Xi,高度为 Hi,现在你需要推倒所有的摩天大楼。你每次可以选择炸毁一个大楼使得它往左边倒下去,或者往右边倒下去,在一栋摩天大楼倒下去的时候,有可能顺带推倒了一些其他的摩天大楼。第 i 栋大楼向左倒会将所有
        阅读全文
                
摘要:Farmer John must measure Q (1 <= Q <= 20,000) quarts of his finest milk and deliver it in one big bottle to a customer. He fills that bottle with exac
        阅读全文
                
摘要:D. Transferring Pyramid time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output D. Transferring 
        阅读全文
                
摘要:The advice to "buy low" is half the formula to success in the stock market. But to be considered a great investor you must also follow this problems' 
        阅读全文
                
摘要:Farmer Brown's cows are up in arms, having heard that McDonalds is considering the introduction of a new product: Beef McNuggets. The cows are trying 
        阅读全文
                
摘要:You just inherited the rights to N (1 <= N <= 20) previously unreleased songs recorded by the popular group Raucous Rockers. You plan to release a set
        阅读全文
                
摘要:Consider the following two-player game played with a sequence of N positive integers (2 <= N <= 100) laid onto a 1 x N game board. Player 1 starts the
        阅读全文
                
摘要:In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zorkmids (z) and the price of a vase is 5z. In o
        阅读全文
                
摘要:Cow Pedigrees Farmer John is considering purchasing a new herd of cows. In this new herd, each mother cow gives birth to two children. The relationshi
        阅读全文
                
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号