要求:A quadratic solution is not acceptedlet array A contain N positive numbers.determine the maximun value of A[j]/A[i],where j>i.for instance,if the array contains 4,6,,2,4,5 ,1 ,3,then the maximuc value is 3,determined by the seventh and eight

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/01 08:35:15
要求:A quadratic solution is not acceptedlet array A contain N positive numbers.determine the maximun value of A[j]/A[i],where j>i.for instance,if the array contains 4,6,,2,4,5 ,1 ,3,then the maximuc value is 3,determined by the seventh and eight
xRN@~))VOWDicO {lv!Ct9yXhbfVoE{u0\UXIC<- s20hJ]!HbX"dhe6D[1T1I2CY0i oOBQk+ FrF UMGCG, ዎXh  ћݹ-Waۀ4Mc@HL0To `oAur7{<u&yum+6u +rzuS݆oΠkqfOO'?xݟO~.gN)zq^Sb;!Ⱦ7!mT]ܠv /SBr ff

要求:A quadratic solution is not acceptedlet array A contain N positive numbers.determine the maximun value of A[j]/A[i],where j>i.for instance,if the array contains 4,6,,2,4,5 ,1 ,3,then the maximuc value is 3,determined by the seventh and eight
要求:A quadratic solution is not accepted
let array A contain N positive numbers.determine the maximun value of A[j]/A[i],where j>i.for instance,if the array contains 4,6,,2,4,5 ,1 ,3,then the maximuc value is 3,determined by the seventh and eighth element.
比如数组 1000 10001 1002 10 100 200 300 3 10 2 6 1 3
最大是A[7]/A[4]=300/10=30
给个小于O(n^2)的算法~

要求:A quadratic solution is not acceptedlet array A contain N positive numbers.determine the maximun value of A[j]/A[i],where j>i.for instance,if the array contains 4,6,,2,4,5 ,1 ,3,then the maximuc value is 3,determined by the seventh and eight
double Minimum=data[1],Answer=0.;
for(int i=2;i