Instability HDU - 5917(Ramsey定理)

Instability HDU - 5917 Long long ago, there was a prosperous kingdom which consisted of n cities and every two cites were connected by an undirected ...

2018-09-25 17:11:25

阅读数 85

评论数 0

K-th Number HDU - 6231(二分+尺取)

K-th Number HDU - 6231 Alice are given an array A[1…N] with N numbers. Now Alice want to build an array B by a parameter K as following rules: Initia...

2018-09-24 11:02:57

阅读数 104

评论数 2

A Simple Stone Game HDU - 6237(分解质因子+思维)

A Simple Stone Game HDU - 6237 After he has learned how to play Nim game, Bob begins to try another stone game which seems much easier. The game goes...

2018-09-24 07:57:01

阅读数 118

评论数 0

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

Counting UVA - 10198(线性递推式)

Counting UVA - 10198 题意: Gustavo数数时总是把1和4搞混,他认为4只是1的另外一种写法。给出一个整数n,Gustavo想知道有多少个数的数字之和恰好为n。例如,当n=2时,有5个数:11、14、41、44、2。 分析: 设dp[n]表示加和为n的组合的个数 那么很明显...

2018-09-22 09:33:02

阅读数 96

评论数 0

Sum HDU - 4407(容斥定理)

Sum HDU - 4407 XXX is puzzled with the question below: 1, 2, 3, …, n (1<=n<=400000) are placed in a line. There are m (1&am...

2018-09-21 13:30:04

阅读数 65

评论数 0

Balloon Robot ZOJ - 3981(思维)

Balloon Robot ZOJ - 3981 The 2017 China Collegiate Programming Contest Qinhuangdao Site is coming! There will be teams participating in the contest, ...

2018-09-21 10:23:14

阅读数 72

评论数 0

Safest Buildings ZOJ - 3993(计算几何+思维)

Safest Buildings ZOJ - 3993 PUBG is a multiplayer online battle royale video game. In the game, up to one hundred players parachute onto an island a...

2018-09-21 07:42:55

阅读数 82

评论数 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

Crusaders Quest ZOJ - 3983(思维+暴力)

Crusaders Quest ZOJ - 3983 Crusaders Quest is an interesting mobile game. A mysterious witch has brought great darkness to the game world, and the on...

2018-09-19 07:40:59

阅读数 65

评论数 0

Uva12230Crossing Rivers (数学期望)

Uva12230Crossing Rivers (数学期望) 问题: You live in a village but work in another village. You decided to follow the straight path between your house (A) ...

2018-09-18 11:13:19

阅读数 49

评论数 0

ACM-ICPC 2018 焦作网络预赛K-Transport Ship(多重背包)

ACM-ICPC 2018 焦作网络预赛K-Transport Ship There are NNN different kinds of transport ships on the port. The ithi^{th}ith kind of ship can carry the weigh...

2018-09-16 10:29:03

阅读数 121

评论数 0

ACM-ICPC 2018 焦作网络预赛 B - Mathematical Curse(dp)

ACM-ICPC 2018 焦作网络预赛 B - Mathematical Curse A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics whe...

2018-09-16 08:45:57

阅读数 158

评论数 0

Computer HDU - 2196(树形DP)

Computer HDU - 2196 A school bought the first computer some time ago(so this computer’s id is 1). During the recent years the school bought N-1 new ...

2018-09-15 09:53:37

阅读数 63

评论数 0

Puzzled Elena HDU - 5468(dfs序+容斥定理)

Puzzled Elena HDU - 5468 Since both Stefan and Damon fell in love with Elena, and it was really difficult for her to choose. Bonnie, her best frien...

2018-09-14 19:56:12

阅读数 67

评论数 0

Stern-Brocot Tree HDU - 4556(法里数列长度)

Stern-Brocot Tree HDU - 4556  上图是一棵Stern-Brocot树,其生成规则如下:   从第1行到第n行,每行相邻两数a/b和c/d,产生中间数(a+c)/(b+d),置于下一行中。将一行的分数(包括0/1,1/0),进行约分简化,则每一行(包括0/1,1/0...

2018-09-14 15:54:46

阅读数 58

评论数 0

Pythagoras HDU - 6211(法里数列构造+本原勾股数组+本地预处理不出来。。)

Pythagoras HDU - 6211 Given a list of integers a0,a1,a2,⋯,a2k−1. Pythagoras triples over 109 are all solutions of x2+y2=z2 where x,y and z are const...

2018-09-14 15:08:43

阅读数 112

评论数 0

Zuma HDU - 6212(区间dp)

Zuma HDU - 6212 Think about the Zuma Game. You have a row of at most 200 black(0) or white(1) balls on the table at the start. Each three conse...

2018-09-14 09:44:45

阅读数 57

评论数 0

The Intersection HDU - 6209(二分分数+法里数列构造)

The Intersection HDU - 6209 A given coefficient K leads an intersection of two curves f(x) and gK(x). In the first quadrant, the curve f is a monoto...

2018-09-14 05:38:45

阅读数 63

评论数 0

Brute Force Sorting HDU - 6215(模拟双向链表)

Brute Force Sorting HDU - 6215 Beerus needs to sort an array of N integers. Algorithms are not Beerus’s strength. Destruction is what he excels. He ...

2018-09-14 04:50:48

阅读数 39

评论数 0

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