UVa11646
题目大意: 给定跑道周长400,弯道是同一个圆的两部分(You are also told that the sliced circles will be such that they are part of the same circle.)同时,给定矩形的长宽比例a : b,求长、宽具体值
如下图:
ang1 = atan(a/b);
ang2 = PI - 2*ang1;
由 x / (2*r) = sin(ang1) 得: r = x/(2*sin(ang1));
x + ang2*(x/(2*sin(ang1))) = 200;
于是: x = 200 / (1+ang2/(2*sin(ang1));
再由 x/a = y/b 导出:y=x*b/a;