随笔分类 -  【数学】

摘要:Problem HHARDLY HARDYou have been given the task of cutting out a quadrilateral slice of cake out of a larger, rectangular cake. You must find the sli... 阅读全文

posted @ 2015-03-09 18:41 LLGemini 阅读(159) 评论(0) 推荐(0)

摘要:看到了大神的代码。理解了好久。。。真是差距。题意:给出m, p, a, b,然后xi满足已下两个公式, 求xp1+xp2+...+xpm的最大值。1、-1/sqrt(a) 0)2、x1+x2+...+xm = b*sqrt(a);注意:p为偶数。解题思路:因为p为偶数,所以sqrt(a)和-1/sq... 阅读全文

posted @ 2015-03-08 21:00 LLGemini 阅读(269) 评论(0) 推荐(0)

摘要:Dsecriptionn participants of «crazy tea party» sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time ... 阅读全文

posted @ 2015-03-08 20:38 LLGemini 阅读(194) 评论(0) 推荐(0)

摘要:FibonacciTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 795Accepted Submission(s): 213Problem Des... 阅读全文

posted @ 2015-02-02 00:34 LLGemini 阅读(196) 评论(0) 推荐(0)

摘要:模拟发现,每个元素求和时,元素的系数是二项式系数,于是ans=sum(C(n-1,i)*a[i]/2^(n-1)),但是n太大,直接求会溢出,其实double的范围还是挺大的,所以可以将组合数转化成对数:e^(lnC(n-1, k)*A[k]/(2^n-1) ) ==> e^( ln C(n-1,k... 阅读全文

posted @ 2014-09-05 19:32 LLGemini 阅读(307) 评论(0) 推荐(0)

摘要:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=481&page=show_problem&problem=1962刚开始没理解题意,看了题解之后也不太理解,现在好点了。其实可以看作每个麻球的... 阅读全文

posted @ 2014-09-04 00:37 LLGemini 阅读(174) 评论(0) 推荐(0)

摘要:POINT : 质因子分解;(仅给题解)http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1721题意:给你两个整数m和n,求最大的k使... 阅读全文

posted @ 2014-08-21 13:30 LLGemini 阅读(169) 评论(0) 推荐(0)