鉴于数学已经还给老师了,这道题直接看的discuss上面的公式:http://poj.org/showmessage?message_id=101131
thestoryofsnow | 1045 | Accepted | 148K | 0MS | C++ |
/*
ID: thestor1
LANG: C++
TASK: poj1045
*/
#include <iostream>
#include <fstream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <limits>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <cassert>
using namespace std;
int main()
{
double Vs, R, C;
int n;
scanf("%lf%lf%lf%d", &Vs, &R, &C, &n);
// printf("Vs: %lf, R: %lf, C: %lf, n: %d\n", Vs, R, C, n);
double w;
for (int i = 0; i < n; ++i)
{
scanf("%lf", &w);
printf("%.3lf\n", C * R * w * Vs / sqrt(1 + C * R * w * C * R * w));
}
return 0;
}