摘要: Mishap in ClubPolycarpus just has been out of luck lately! As soon as he found a job in the "Binary Cat" cafe, the club got burgled. All ice-cream was stolen.On the burglary night Polycarpus kept a careful record of all club visitors. Each time a visitor entered t... 阅读全文
posted @ 2013-01-24 19:00 KRisen 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 三分搜索法 二分法作为分治中最常见的方法,适用于单调函数,逼近求解某点的值。但当函数是凸性函数时,二分法就无法适用,这时三分法就可以“大显身手”~~ 如图,类似二分的定义Left和Right,mid = (Left + Right) / 2,midmid = (mid + Right) / 2; 如果mid靠近极值点,则Right = midmid;否则(即midmid靠近极值点),则Left = mid;程序模版如下:double Calc(Type a){ /* 根据题目的意思计算 */}void Solve(void){ double Left, Right; double mid, m 阅读全文
posted @ 2013-01-24 11:41 KRisen 阅读(341) 评论(2) 推荐(0) 编辑
摘要: Strange fuctionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1612Accepted Submission(s): 1206Problem DescriptionNow, here is a fuction:F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and 阅读全文
posted @ 2013-01-24 11:37 KRisen 阅读(333) 评论(0) 推荐(0) 编辑