题目:http://acm.hdu.edu.cn/showproblem.php?pid=2548
AC代码(C++):
#include <iostream> #include <queue> #include <string> #include <algorithm> #include <math.h> #define INF 0x3f3f3f3f #define eps 1e-8 using namespace std; int main() { int t; cin >> t; while (t--) { double u, v, w, l; cin >> u >> v >> w >> l; double ans = (l / (u + v))*w; printf("%.3lf\n", ans); } //system("pause"); }总结: 水题. 总距离等于记者速度*交锋时间.