595D - Max and Bike 思路:开始和结束时的计时器的高度相同时(也就是关于圆竖着直径对称)时间最少. 证明: 总距离为d. 圆周长为s=2*π*r. 设len=d-floor(d/s)*s. len=θ1*r+θ2*r+sin(θ1)*r+sin(θ2)*r. 要使sin(θ1)*r+sin(θ2)*r尽可能大,或者说θ1*r+θ2*r尽可能小. 根据和差化积公式的 sin(θ1)+sin(θ2)=2*sin((θ1+θ2)/2)*cos((θ1-θ2)/2) (θ1-θ2)越趋…
D. Max and Bike Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/595/problem/D Description For months Maxim has been coming to work on his favorite bicycle. And quite recently he decided that he is ready to take part in a cy…
D. Max and Bike For months Maxim has been coming to work on his favorite bicycle. And quite recently he decided that he is ready to take part in a cyclists' competitions. He knows that this year n competitions will take place. During the i-th competi…
A.Warrior and Archer(思维) 战士一定会ban掉当前边缘的位置.而战士和射手就会选择剩下的最远的两点.我们让剩下的最远的两点最近就达到了均衡.于是我们枚举战士ban掉的边缘,ban的次数是一定的. # include <cstdio> # include <cstring> # include <cstdlib> # include <iostream> # include <vector> # include <que…