码迷,mamicode.com
首页 >  
搜索关键字:calculate    ( 959个结果
几道算法题
1.Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-...
分类:其他好文   时间:2014-06-02 17:36:53    阅读次数:234
Leetcode: Best Time to Buy and Sell Stock
My original thought was to calculate all the possible transactions by using nested loop. But got time limit excess error.I knew it can be done in O(n)...
分类:其他好文   时间:2014-05-29 20:44:37    阅读次数:271
Brute-forced Euclid Distance Transform
Sepearable 2D EDT, going to extend to 3D in order to calculate the Signed Distance Function(Field)Cost 0.75s to generate the SDF at 768^2
分类:其他好文   时间:2014-05-28 03:13:14    阅读次数:276
ZOJ 3772 Calculate the Function 线段树+矩阵
Calculate the FunctionTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusAppoint description:DescriptionYou are given a list ...
分类:其他好文   时间:2014-05-27 18:03:16    阅读次数:394
HDU4033:Regular Polygon(二分+余弦定理)
Problem Description In a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes of the regular polygon, can you calculate t...
分类:其他好文   时间:2014-05-26 03:50:40    阅读次数:252
calculate the sum of some integers
DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Each line s...
分类:其他好文   时间:2014-05-23 06:41:47    阅读次数:298
44. log(n)求a的n次方
Calculate a^n in log(n).
分类:其他好文   时间:2014-05-23 06:12:35    阅读次数:175
HDU1003 Max Sum 最大子序列和的问题【四种算法分析+实现】
就拿杭电OJ上的第1003题开始吧,这题比原书要复杂一些。 Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum...
分类:其他好文   时间:2014-05-22 07:07:27    阅读次数:322
8.另类方法求1+2+...+n
Another way to calculate sum of 1 to N.
分类:其他好文   时间:2014-05-22 03:33:00    阅读次数:201
16.O(logn)求Fibonacci数列
Dynamic programming and meta-programming to calculate Fib arrays.
分类:其他好文   时间:2014-05-22 01:42:39    阅读次数:341
959条   上一页 1 ... 93 94 95 96 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!