Stein J最大公约数算法最初于1967年发表在Journal of Computational Physics,原文标题为:Computational problems associated with Racah algebra,目前版权在Elsevier(http://www.sciencedirect.com/ ),只可惜学校好像没买到这麽老的索引,所以只能查看摘要,要全文需要30刀。。 ... Read More
posted @ 2012-06-17 15:59 Dance With Automation Views(284) Comments(0) Diggs(0)
依旧现贴出程序代码再进行分析: 1: #include <stdio.h> 2: #include <stdlib.h> 3: 4: int sc=0; 5: int max3(int a,int b, int c) 6: { 7: sc++; 8: if(a>b) 9: { 10: return... Read More
posted @ 2012-06-17 13:33 Dance With Automation Views(218) Comments(0) Diggs(0)
先给出实现程序,如下: 1: int max_sub_sum2(const int v[],int n) 2: { 3: int max=0; 4: int currentSum=0; 5: int i=0; 6: 7: for(i=0;i<n;i++) 8: { 9: currentSum+=v... Read More
posted @ 2012-06-17 13:33 Dance With Automation Views(352) Comments(0) Diggs(0)
依旧先摆出算法代码: 1: int get_common_divisor(int a,int b) 2: { 3: int x=a; 4: int y=b; 5: int m=0; 6: 7: while(y>0) 8: { 9: m=x%y; 10: x=y; ... Read More
posted @ 2012-06-17 13:32 Dance With Automation Views(263) Comments(0) Diggs(0)