#include #include using namespace std; using namespace atcoder; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; //using mint = modint1000000007; //using mint = modint998244353; static const double PI = acos(0)*2; struct ST { int X, Y, R, V, A; }; int N, W; vector v; double dp[1<<13][13]; double calc(double t, int x, int y){ double posx = v[x].X + v[x].R * cos((v[x].V * t + v[x].A) * PI / 180.0); double posy = v[x].Y + v[x].R * sin((v[x].V * t + v[x].A) * PI / 180.0); double l=0, r=1e15; rep(i,100){ double m = (l+r)/2; double tx = v[y].X + v[y].R * cos((v[y].V * (t+m) + v[y].A) * PI / 180.0); double ty = v[y].Y + v[y].R * sin((v[y].V * (t+m) + v[y].A) * PI / 180.0); double dist = sqrt((tx-posx)*(tx-posx) + (ty-posy)*(ty-posy)); if(m * W < dist) l = m; else r = m; } return (l+r)/2; } int main(){ cin >> N >> W; rep(i,N){ ST st; cin >> st.X >> st.Y >> st.R >> st.V >> st.A; v.push_back(st); } v.push_back((ST){0,0,0,0,0}); rep(i,1<<13) rep(j,13) dp[i][j] = 1e300; dp[1<>k)&1) continue; if(dp[i][j] > 1e299) continue; //cerr << i << " " << j << " " << k << " " << dp[i][j] << " " << calc(dp[i][j],j,k) << endl; dp[i|(1<