HDU 4632 Palindrome subsequence(区间dp)

http://acm.hdu.edu.cn/showproblem.php?pid=4632 Problem Description In mathematics, a subsequence is a sequence that can be derived from another s...

2018-01-27 14:10:37

阅读数 40

评论数 0

POJ 2955 Brackets 区间dp

http://poj.org/problem?id=2955 Description We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a re...

2018-01-27 13:57:19

阅读数 59

评论数 0


1,先把第一个数赋给mid 2,后来的数如果>=mid就插入到小顶堆 3,每次插入新的值后都保证小顶堆的大小与大顶堆相等或大1 4,最后的中位数就是mid(n为奇数),或者mid和小顶堆的堆顶元素的平均 priority_queueint,vectorint>,greaterin...

2018-01-25 18:00:31

阅读数 142

评论数 0

hdu1817 Necklace of Beads(polya定理)

http://acm.hdu.edu.cn/showproblem.php?pid=1817 Problem Description Beads of red, blue or green colors are connected together into a circular neck...

2018-01-25 11:22:21

阅读数 70

评论数 0

取消 删除