# Codeforces Round #330 (Div. 2)D. Max and Bike （二分）



#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define X first
#define Y second
#define cl(a,b) memset(a,b,sizeof(a))
typedef pair<int,int> P;
const int maxn=300005;
const LL inf=1<<27;
const LL mod=1e9+7;
int n;double r,v,s,f;
double PI=acos(-1.0);
int check(double t){
double angle=fmod(v*t,2*PI*r)/(2*r);
return v*t+2*r*abs(sin(angle))>=f-s;
}
int main(){
scanf("%d%lf%lf",&n,&r,&v);
while(n--){
scanf("%lf%lf",&s,&f);
double l=0,r=999999999999;
for(int i=0;i<100;i++){
double mid=(l+r)/2;
if(check(mid))r=mid;
else l=mid;
}
printf("%.15lf\n",l);
}
return 0;
}


#### Educational Codeforces Round 36 (Rated for Div. 2) 题解

2018-01-13 23:16:24

#### Codeforces Round #444 (Div. 2)-贪心&尺取-Ratings and Reality Shows

2017-11-11 20:11:11

#### Codeforces Round #446 (Div. 2) D. Gluttony

2017-11-18 21:07:25

#### CF-Codeforces Round #483 (Div. 2)-D-XOR-pyramid

2018-05-16 01:15:04

#### Codeforces Round #426 (Div. 2) D. The Bakery（DP+线段树）

2017-07-31 09:16:44

#### Codeforces Round #364 (Div. 2) D. As Fast As Possible

2016-07-23 12:26:35

#### Codeforces Round #476 (Div. 2) [Thanks, Telegram!] D - Single-use Stones（思维）

2018-04-27 00:50:37

#### Codeforces Round #480 (Div. 2): D. Perfect Groups（思维题）

2018-05-09 17:29:44

#### Codeforces Round #483 (Div. 2) D. XOR-pyramid

2018-05-16 14:27:28

#### Codeforces Round #402 (Div. 2)C. Dishonest Sellers【贪心】这个贪心好水啊....

2017-02-27 13:07:44