2 1 2 1000
666.67
#include <stdio.h> #include <string.h> #include <algorithm> using namespace std; #define exp 1e-8 int t,n; double a[105],x; int main() { int i; while(~scanf("%d",&n)) { for(i = 0; i<n; i++) scanf("%lf",&a[i]); scanf("%lf",&x); double l,r,mid,ans; l = 0,r = x*100; while(r-l>exp) { double sum = 0; mid = (l+r)/2; for(i = 0; i<n; i++) sum+=mid/a[i]; if(sum<=x) { ans = mid; l = mid; } else r = mid; } printf("%.2f\n",ans); } return 0; }
TI C66x DSP 四种内存保护问题 -之- 外设访问corePac内部资源时的内存保护问题,布布扣,bubuko.com
TI C66x DSP 四种内存保护问题 -之- 外设访问corePac内部资源时的内存保护问题
原文地址:http://blog.csdn.net/yiyeguzhou100/article/details/26056973