- 博客(14)
- 收藏
- 关注
原创 HDU 6156 Palindrome Function
Palindrome FunctionProblem DescriptionAs we all know,a palindrome number is the number which reads the same backward as forward,such as 666 or 747.Some numbers are not the palindrome numbe
2017-08-19 21:12:42 567
转载 HDU 6134 莫比乌斯反演
题目链接题意: 已知n=1e6,求: f(n)=∑i=1n∑j=1i⌈ij⌉[gcd(i,j)==1]思路: 首先套上莫比乌斯反演的经典转化: ∑d|nμ(d)=[n==1]得: f(n)=∑i=1n∑j=1i⌈ij⌉∑d|gcd(i,j)μ(d)转换枚举变量为d,令i=k1d,j=k2d
2017-08-18 13:48:26 257
原创 HDU 3516
Tree ConstructionProblem DescriptionConsider a two-dimensional space with a set of points (xi, yi) that satisfy xi yj for all i < j. We want to have them all connected by a directed tree whos
2017-08-11 14:17:42 308
原创 HDU 2993
MAX Average ProblemProblem DescriptionConsider a simple sequence which only contains positive integers as a1, a2 ... an, and a number k. Define ave(i,j) as the average value of the sub sequenc
2017-08-10 09:11:33 411
原创 HDU 3660
Alice and Bob's TripAlice and Bob are going on a trip. Alice is a lazy girl who wants to minimize the total travelling distance, while Bob as an active boy wants to maximize it. At the same time
2017-08-07 18:59:45 319
原创 HDU 6076
Security CheckProblem DescriptionIn airport of Bytetown, there are two long queues waiting for security check. Checking a person needs one minute, and two queues can be checked at the same time.Pict
2017-08-06 18:38:51 270
原创 HDU 6069
Counting DivisorsProblem DescriptionIn mathematics, the function d(n) denotes the number of divisors of positive integer n.For example, d(12)=6 because 1,2,3,4,6,12 are all 12's divisors.In this p
2017-08-06 18:38:46 457
原创 ZOJ - 3469 Food Delivery (区间dp)
When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this time, we may call for food delivery.Suppose there are N people living i
2017-08-06 18:38:41 345
原创 HDU - 3853
LOOPSTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 6423 Accepted Submission(s): 2572Problem DescriptionAkemi Homura is a Mahou Shoujo
2017-08-06 18:38:37 274
原创 斜率优化dp
转载自http://www.cnblogs.com/ka200812/archive/2012/08/03/2621345.html我们知道,有些DP方程可以转化成DP[i]=f[j]+x[i]的形式,其中f[j]中保存了只与j相关的量。这样的DP方程我们可以用单调队列进行优化,从而使得O(n^2)的复杂度降到O(n)。 可是并不是所有的方程都可以转化成上面的形式,举个例子:dp[i]=dp
2017-08-06 18:38:32 208
原创 UVA 11752 The Super Powers
We all know the Super Powers of this world and how they manage to get advantages in political warfare or even in other sectors. But this is not a political platform and so we will talk about a differe
2017-08-06 18:38:27 224
原创 语文素养
http://post.mp.qq.com/kan/article/2713129639-25136036.html?_wv=2147483777&sig=b569fd1341a33f43f028a8784a2ca5a2&article_id=25136036&time=1481339673&_pflag=1&x5PreFetch=1&from=0&web_ch_id=0 语文素
2017-08-06 18:38:22 196
原创 poj 3761 bubble sort (排列组合)
#include#include#define ll long long#define mod 20100713const int maxn=1000005;ll a[maxn];ll poww(ll x,int n){ ll ret=1; while(n) { if(n&1) ret=ret
2017-08-06 18:38:18 180
原创 UVA 11174 Stand in a Line
All the people in the byteland want to stand in a line in such a way that no person stands closer to thefront of the line than his father. You are given the information about the people of the bytel
2017-08-06 18:38:13 263
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人