/*
中文题意:
中文翻译:
题目大意:
解题思路:
难点详解:用到一个公式sqrt(a[ i ] * a[ i ]-1 )。他是求边长的,令边长为sum,sum=sqrt(r*r-1)*2,如果不够继续加长方形知道够为止。
关键点:快排,
解题人:lingnichong
解题时间:2014/07/29 21:36
感想:写了很久很久,才写出来,才理解意思是啥
*/
...
分类:
其他好文 时间:
2014-07-30 01:08:22
阅读次数:
223
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4893
题意:给你一个长度n的数列,初始都为0,有三种操作,第一种给第k个位置的数加d,第二种是查询区间 [l , r] 的总和,第三种是使区间 [l , r] 的值改为离它最近的那个斐波那契数的值。
我刚开始用sum数组存储节点的值,第三种操作是个区间更新,但是区间更新的值不一样,我就想当然的...
分类:
其他好文 时间:
2014-07-29 22:06:02
阅读次数:
358
http://acm.hdu.edu.cn/showproblem.php?pid=1003
Max Sum
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 142781 Accepted Submission(s): 3...
分类:
其他好文 时间:
2014-07-29 21:56:02
阅读次数:
257
For a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits.
When M is the digitsum of N , we call N a generator of M .
For example, the digit-sum of 245 is 256 (...
分类:
其他好文 时间:
2014-07-29 21:53:12
阅读次数:
284
转移方程dp[i][j]=Max(dp[i][j-1]+a[j],max(dp[i-1][k] ) + a[j] ) 0
此链接中有详解点击打开链接
#include
#include
#include
using namespace std;
#define MAXN 1000000
#define INF 0x7fffffff
int dp[MAXN+10];
int mma...
分类:
其他好文 时间:
2014-07-29 21:50:32
阅读次数:
220
//获得汉字字符个数function ChineseWordsCount(text:string):Integer;var i,sum,e,c,t: Integer;begin Result:=0; c := 0; sum := Length(text); if Sum=0 then exit; f...
分类:
其他好文 时间:
2014-07-29 21:14:32
阅读次数:
211
起始点是从头开始的,一直到后面搜索,一直到和为小于零,起始点就从开始小于零的后一位开始并把结果改为零,再搜索的过程中,一遇到大的数据就记录下来,把其计为起始点和终点的,这里面主要考虑到,当你搜索到一个位置的,它的和不小于零的,那对于后面来说,加上去还是会变大的,不会给变小的,所以要再搜索下去的,走一边就KO了。代码如下:#include
#include
#include
using namesp...
分类:
其他好文 时间:
2014-07-29 18:07:52
阅读次数:
149
Max Sum
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 142742 Accepted Submission(s): 33225
Problem Description
Given a sequenc...
分类:
其他好文 时间:
2014-07-29 17:58:12
阅读次数:
329
menu 菜单French cuisine 法国菜today's special 今日特餐chef's special 主厨特餐buffet 自助餐fast food 快餐specialty 招牌菜continental cuisine 欧式西餐aperitif 饭前酒dim sum 点心Frenc...
分类:
其他好文 时间:
2014-07-29 17:35:22
阅读次数:
188
题意:给你一个闭区间[a,b],求一个最小的L,使得在区间[a,b-L+1]内任取一个数x,可以满足在x,x+1,x+2,……,x+L-2,x+L-1内至少包含k个素数。(1using namespace std;int a,b,k;int sum[1000010];//默认的值为0int pri[...
分类:
其他好文 时间:
2014-07-29 17:11:02
阅读次数:
205