Expressions UVA - 10157(组合数学+递推)

Expressions UVA - 10157 题目: 给你n个括号,求合法的匹配中,深度不超过d的组合数。 分析: 组合,计数,dp,大整数。 这个题目很像卡特兰数,不过深度有限制,可以利用卡特兰数的递推公式求解; 设DP(k,d)为k对括号形成深度不超过d的合法匹配方法数;则有: DP(k,d...

2018-09-23 09:09:10

阅读数 60

评论数 0

Numbers ZOJ - 3987(二进制思维+贪心)

Numbers ZOJ - 3987 DreamGrid has a nonnegative integer . He would like to divide into nonnegative integers and minimizes their bitwise or (i.e. and s...

2018-09-19 12:07:08

阅读数 113

评论数 0

Apple HDU - 6206(JAVA高精度求三角形外心)

Apple HDU - 6206 Apple is Taotao’s favourite fruit. In his backyard, there are three apple trees with coordinates (x1,y1), (x2,y2), and (x3,y3). Now...

2018-09-13 16:54:35

阅读数 54

评论数 0

Game of Taking Stones HDU - 5973(java高精度二分开根号+威佐夫博弈)

Game of Taking Stones HDU - 5973 Two people face two piles of stones and make a game. They take turns to take stones. As game rules, there are two ...

2018-07-22 09:50:50

阅读数 71

评论数 0

YYS FZU - 2278 (概率期望+大数)

YYS FZU - 2278 Yinyangshi is a famous RPG game on mobile phones. Kim enjoys collectin...

2018-04-07 12:33:40

阅读数 221

评论数 1

黄金分割数

黄金分割数 黄金分割数0.61803... 是个无理数,这个常数十分重要,在许多工程问题中会出现。有时需要把这个数字求得很精确。 对于某些精密工程,常数的精度很重要。也许你听说过哈勃太空望远镜,它首次升空后就发现了一处人工加工错误,对那样一个庞然大物,其实只是镜面加工时有比头发丝还...

2018-01-29 16:46:00

阅读数 302

评论数 0

How Many Pieces of Land ? UVA - 10213 (计算几何公式)

How Many Pieces of Land ? UVA - 10213 Lemma If we already have n points on the circle and add one more point, we draw n lines from the ...

2018-01-28 10:01:06

阅读数 138

评论数 0

How Many Fibs? UVA - 10183 (java)

How Many Fibs? UVA - 10183 直接用java大数做,注意一点的是斐波那契数组超过500时,斐波那契数就超过100位了,所以开600的数组足矣 import java.math.BigInteger; import java.util.Scanner; publ...

2018-01-23 10:04:43

阅读数 98

评论数 0

Exponentiation POJ - 1001 (java)

Exponentiation POJ - 1001 Problems involving the computation of exact values of very large magnitude and precision are common. For example,...

2017-12-12 08:40:27

阅读数 215

评论数 0

Divided Land

Divided Land Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1540    Accepted Submission(s...

2017-10-29 18:20:36

阅读数 171

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭