- 博客(7)
- 资源 (2)
- 收藏
- 关注
原创 HDU Dividing 1059
Problem Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the
2016-10-31 21:52:12 308
原创 HDU Computer Transformation 1041
Problem Description A sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the computer simultaneously tranforms each digit 0 into the
2016-10-31 19:07:15 237
原创 poj 2084 Game of Connections
Description This is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, . . . , 2n - 1, 2n consecutively in clockwise order on the ground to form a circle, and then, to dr
2016-10-22 12:48:48 195
原创 hdu 1025 Constructing Roads In JGShining's Kingdom
Problem Description JGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. Half of these cities are rich in resource (we call them ri
2016-10-19 18:58:56 214
原创 排列的字典序问题 算法与设计
问题描述: n个元素{1,2,, n }有n!个不同的排列。将这n!个排列按字典序排列,并编号为0,1,…, n!-1。每个排列的编号为其字典序值。例如,当n=3时,6 个不同排列的字典序值如下: 字典序值 0 1 2 3 4 5 排列 123 132 213 231 312 321 算法设计: 给定n以及n个元素{1,2,,
2016-10-12 16:10:41 2020 3
原创 莫比乌斯反演 传送门
题目描述 给定整数N,求1 数对(x,y)有多少对. 输入 一个整数N 输出 如题 样例输入 4 样例输出 4 解题思路: 这个题目出来可以用欧拉函数来解答之外,点击此处 这是欧拉函数解这道题的思路 那么我们还可以用莫比乌斯反演来做,首先介绍一下莫比乌斯反演的公式: F(n)=∑d|nf(d) ⇒f(n)=∑d|nF(
2016-10-07 21:47:49 253
原创 HDU 莫比乌斯反演 1695 GCD
Problem Description Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since the number of choices ma
2016-10-07 19:46:03 287
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人