码迷,mamicode.com
首页 >  
搜索关键字:max sum plus plus    ( 46271个结果
Get the largest sum of contiguous subarray in an int array
When I finished reading this problem,I thought I could solve it by scan every single subarray in the array,and the time complexity is cubic.Every su.....
分类:其他好文   时间:2014-06-04 15:30:52    阅读次数:255
Vijos 1243 生产产品 (优先队列优化的动态规划)
题意:中文题。不说了。注意一些地方,机器的执行过程是没有顺序的,而且每个机器可以用多次。第一次执行的机器不消耗转移时间K。用dp[i][j]表示第i个机器完成第j个步骤的最短时间,sum[j][i]表示第i个机器完成前j个步骤的时间。比较容易想到一个朴素的状态转移方程:dp[i][j]=min{dp...
分类:其他好文   时间:2014-06-02 19:48:58    阅读次数:261
poj 3318 Matrix Multiplication
http://poj.org/problem?id=3318矩阵A*矩阵B是否等于矩阵C 1 #include 2 #include 3 #include 4 #include 5 #define maxn 1010 6 using namespace std; 7 8 int a[max...
分类:其他好文   时间:2014-06-02 18:18:49    阅读次数:255
hdu---1024Max Sum Plus Plus(动态规划)
Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15898Accepted Submission(s): 5171...
分类:其他好文   时间:2014-06-02 14:59:54    阅读次数:247
C/C++产生随机数
C/C++如何产生随机数:这里要用到的是rand()函数, srand()函数,C语言/C++里没有自带的random(int number)函数。(1) 假设你仅仅要产生随机数而不须要设定范围的话,你仅仅要用rand()就能够了:rand()会返回一随机数值, 范围在0至RAND_MAX 间。RA...
分类:编程语言   时间:2014-06-02 13:11:27    阅读次数:341
关于Oracle安装完毕后,登录时遇到的错误的解决的方法
1 提示无监听服务 解决方法:打开Net Configuration Assistant 依照提示删除现有的监听服务,然后又一次建立一个就可以。2 SQL Plus登陆时提示username或password无效 原因:oracle_home\NETWORK\ADMIN 文件夹以下的sqlnet.....
分类:数据库   时间:2014-06-02 12:47:46    阅读次数:281
Amicable numbers -- Javascript 实现
问题描述: Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a  b, then a and b are an amicable pair and each ...
分类:编程语言   时间:2014-06-02 12:31:42    阅读次数:298
1+2+3+...+n不能用while、for、if else等实现
问题描述 求 1+2+ … +n ,要求不能使用乘除法、 for 、 while 、 if 、 else 、 switch 、 case 等关键字以及条件判断语句。 实际意义不大,题目涉及的知识还是不错的! 方法1 用构造函数求解。 #include using namespace std; class Plus { public: Plu...
分类:其他好文   时间:2014-06-02 10:29:11    阅读次数:208
连接 Oracle 11G R2 ASM实例
连接Oracle11GR2ASM实例 开始连接ASM时候,效仿10G的方法却怎么都连接不到ASM 连接的都是idle实例 [root@tip02~]#su-oracle [oracle@tip02~]$exportORACLE_SID=+ASM2 [oracle@tip02~]$sqlplus/assysdba SQL*Plus:Release11.2.0.3.0ProductiononWedMay1618:23:392012 Copyri..
分类:数据库   时间:2014-06-02 04:02:29    阅读次数:314
scala 常用算法
求和print(Array(1,7,2,9).sum)结果19要使用sum方法,元素类型必须是数值类型:要么是整形,要么是浮点数或者BigInteger/BigDecimal。print(ArrayBuffer("Mary","had","a","little","lamb").max)结果little排序valb=ArrayBuffer(1,7,2,9) valbSorted=b.sorted print(bSorted)..
分类:其他好文   时间:2014-06-02 03:23:26    阅读次数:354
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!