                                                    /* Thank you. 5,12,21,25.
                                                Sometimes, there is no moving forward.
                                                You just have to live with it always. */

#include<bits/stdc++.h>
using namespace std;
typedef long long LL ;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

#define ook order_of_key
#define fbk find_by_order
#define bug printf("Massacre.\n");
#define pf printf
#define sf scanf
#define pb push_back
#define r0 return 0
#define ff first
#define ss second
#define mp make_pair
#define set0(a) memset ((a), 0 , sizeof(a))
#define set1(a) memset((a),-1,sizeof (a))
#define si(a) scanf("%d" , &a)
#define sl(a) scanf("%lld" , &a)
#define sii(a,b) scanf("%d %d" , &a , &b)
#define siii(a,b,c) scanf("%d %d %d" , &a , &b, &c)
#define sll(a,b) scanf("%lld %lld" , &a , &b)
#define slll(a,b,c) scanf("%lld %lld %lld" , &a , &b, &c)
#define pll pair <LL, LL>
#define pii pair <int, int>
#define vi  vector <int>
#define vl  vector <LL>
#define all(x) (x).begin(), (x).end()
#define vii vector <pair <int, int> >
#define vll vector < pair <LL, LL> >
#define mod 1000000007

//using namespace __gnu_pbds;
//typedef tree < int, null_type ,less<int>,rb_tree_tag,tree_order_statistics_node_update > ordered_set;

void func(void)
{
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
}

void print(vector <LL> &v){
    cout << v.size() << endl;
    for(int i = 0; i < v.size(); i++){
        pf("%lld ", v[i]);
    }
    cout << "------------------------------------------------------\n";
    pf("\n");
}

void print(vector <pll> &v){
    cout << v.size() << endl;
    for(int i = 0; i < v.size(); i++){
        pf("%lld %lld\n", v[i].ff, v[i].ss);
    }
    cout << "----------------------------------------------------------\n";
}

void print(double d){
    cout << fixed << setprecision(10) << d << endl;
    cout << "--------------------------------------------------------\n";
}

void print(string s, double d){
    cout << s << " ";
    cout << fixed << setprecision(10) << d << endl;
    cout << "-----------------------------------------------------------\n";
}

template <typename T>
void readToVector(vector <T> &v, LL n){
    T x;
    for(int i = 0; i < n; i++){
        cin >> x;
        v.pb(x);
    }
//    for(T y : v){
//        cout << y << " ";
//    }
//    cout << endl;
}

const int N = 1e6 + 3;
LL dp[8][N];
LL n, m;
int v[3][N];

LL ran = 3;
bool isValid(vector <LL> &v1, vector <LL> &v2){
    for(int i = 0; i + 1 < ran; i++){
        LL ans = v1[i] + v2[i] + v1[i + 1] + v2[i + 1];
    //    cout << "sss " << ans << endl;
        if( ans % 2 != 1)return false;
    }
    return true;
}
LL vr;
LL calc(int j, int i){
    if( i == m){
        return 0LL;
    }
    LL &ret = dp[j][i];
    if(ret != -1)return ret;
    vector <LL> a;
    a.pb(0); a.pb(0); a.pb(0);
    a[0] = ((j & 1) == 1);
    a[1] = ((j & 2) == 2);
    a[2] = ((j & 4) == 4);
    LL ans = 1e18;

    for(int k = 0; k < vr; k++){
        vector <LL> b;
        b.pb((k & 1) == 1);
        b.pb((k & 2) == 2);
        b.pb((k & 4) == 4);
        LL diff = 0;
        for(int l = 0; l < ran; l++){
            if(b[l] != v[l][i])diff++;
        }
      //  cout << i << " -> " << j << " -> " << k << " --> " << diff << endl;
        if(isValid(a, b)){
            ans = min(ans, diff + calc(k, i + 1));
       //     cout << "ans " << ans << endl;
        }
    }
 //   cout << ans << endl;
    return ret = ans;

}

void clr(int n){
    set1(dp);
}

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
//    func();
    LL q, i,j = 0, temp, t, k, ans = 0, sum = 0, x, y, z, cnt = 0, fg = 0, mx = 0, mx1 = 0, mn = 8000000000000000000, mn1 = 8000000000000000000;
    cin >> n >> m;
    clr(n);
    if(n >= 4 and m >= 4){
        cout << -1 << endl;
        r0;
    }
    for(int i = 0; i < n; i++){
        string s;
        cin >> s;
        if(n > m){
            for(int j = 0; j < s.size(); j++){
                v[j][i] = s[j] - 48;
            }
        }
        else{
            for(int j = 0; j < s.size(); j++){
                v[i][j] = s[j] - 48;
            }
        }
    }
    if(n > m)swap(n, m);
    ran = min(n, 3LL);

    ans = 1e18;
    if(n == 1){
        cout << 0 << endl;
        r0;
    }
    vr = 4;
 //   cout << "RAN " << ran << endl;
    if(ran == 3)vr = 8;
  //  cout << vr << endl;
//    cout << n << " --- " << m << endl;
//    for(int i = 0; i < n; i++){
//        for(int j = 0; j < m; j++){
//            cout << v[i][j];
//        }
//        cout << endl;
//    }
    for(int i = 0; i < vr; i++){
        for(int j = 0; j < vr; j++){
            vector <LL> a;
            a.pb(0); a.pb(0); a.pb(0);
            a[0] = ((i & 1) == 1);
            a[1] = ((i & 2) == 2);
            a[2] = ((i & 4) == 4);

            vector <LL> b;
            b.pb(0); b.pb(0); b.pb(0);
            b[0] = ((j & 1) == 1);
            b[1] = ((j & 2) == 2);
            b[2] = ((j & 4) == 4);

            //LL ans = 1e18;
            LL diff = 0;
            for(int k = 0; k < ran; k++){
                if(a[k] != v[k][0])diff++;
                if(b[k] != v[k][1])diff++;
            }
            if(isValid(a, b)){
                ans = min(ans, diff + calc(j, 2));
             //   cout << "VALID " << endl;
            }
           // cout << i << " -> " << j << " ANS " << ans << " --> " << diff << endl;
        }

       // cout << ans << " " << i << " --> " << diff << endl;
    }
    cout << ans << endl;

}


/*
 * -----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <nlehmann@dcc.uchile.cl> wrote this file. As long as you retain this notice
 * you can do whatever you want with this stuff. If we meet some day, and you
 * think this stuff is worth it, you can buy me a beer in return Nicolás Lehmann
 * -----------------------------------------------------------------------------
 */

#include <climits>
#include <vector>
#include <tuple>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <iostream>
using namespace std;

#define PI 3.14159265358979323846264338327950288

long long x0, y00, v, T;
int n;

int pow2(int a) {
  return a*a;
}

double angle(double a, double b, double c) {
  return acos((a*a+b*b-c*c)/(2.0*a*b));
}

int main() {
  cin >> x0 >> y00 >> v >> T;
  int r0 = v*T;
  cin >> n;

  vector<tuple<long long, long long, long long>> circles(n);
  long long xi, yi, ri;
  for (int i = 0; i < n; ++i) {
    cin >> xi >> yi >> ri;
    xi -= x0;
    yi -= y00;
    circles[i] = make_tuple(xi, yi, ri);
    if (xi*xi + yi*yi <= ri*ri) {
      printf("%.10lf\n", 1.0);
      return 0;
    }
  }

  vector<pair<double,double>> angles;
  for (int i = 0; i < n; ++i) {
    tie(xi, yi, ri) = circles[i];
    long long di2 = xi*xi + yi*yi;

    // Circles do not intersect or intersect in one point
    if (di2 >= pow2(r0 + ri))
      continue;

    if (ri == 0)
      continue;

    // Length of segment to tangent point
    double h = sqrt(di2 - ri*ri);
    // printf("h: %lf\n", h);

    // Tangent points are inside reachable circle
    double alpha;
    if (r0 > h)
      alpha = angle(h, sqrt(di2), ri*ri);
    else
      alpha = angle(r0, sqrt(di2), ri);
    // printf("alpha: %.10lf\n", alpha);

    // Angle until center of circle
    double alphacenter = angle(sqrt(di2), fabs(xi), fabs(yi));
    if (xi <= 0 and yi >= 0)
      alphacenter = PI - alphacenter;
    else if (xi <= 0 and yi <= 0)
      alphacenter += PI;
    else if (xi >= 0 and yi <= 0)
      alphacenter = 2.0*PI - alphacenter;
    // printf("center: %lf \n", alphacenter);

    double alphalow = alphacenter - alpha;
    double alphaup = alphacenter + alpha;
    if (alphalow < 0) {
      angles.emplace_back(2.*PI+alphalow, 2.*PI);
      angles.emplace_back(0, alphaup);
    } else if (alphaup > 2.*PI) {
      angles.emplace_back(alphalow, 2.*PI);
      angles.emplace_back(0, alphaup - 2.*PI);
    } else {
      angles.emplace_back(alphalow, alphaup);
    }
  }

  if (angles.size() == 0) {
    printf("%.10lf\n", 0.0);
    return 0;
  }
  // for (int i = 0; i < (int) angles.size(); ++i) {
  //   printf("(%.10lf %.10lf)\n", angles[i].first, angles[i].second);
  // }

  sort(angles.begin(), angles.end());
  double upperbound = angles[0].second;
  double sum = angles[0].second - angles[0].first;
  for (int i = 1; i < (int) angles.size(); ++i) {
    double l, r;
    tie(l, r) = angles[i];
    if (r < upperbound)
      continue;
    l = max(upperbound, l);
    sum += r - l;
    upperbound = max(r, upperbound);
  }

  // printf("%.10lf\n", sum);
  printf("%.10lf\n", sum/(2.*PI));

  return 0;
}


/*
 * -----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <nlehmann@dcc.uchile.cl> wrote this file. As long as you retain this notice
 * you can do whatever you want with this stuff. If we meet some day, and you
 * think this stuff is worth it, you can buy me a beer in return Nicolás Lehmann
 * -----------------------------------------------------------------------------
 */

#include <climits>
#include <vector>
#include <tuple>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <iostream>
using namespace std;

#define PI 3.14159265358979323846264338327950288

long long x0, y00, v, T;
int n;

long long pow2(long long a) {
  return a*a;
}

double angle(double a, double b, double c) {
  return acos((a*a+b*b-c*c)/(2.0*a*b));
}

int main() {
  cin >> x0 >> y00 >> v >> T;
  long long r0 = v*T;
  cin >> n;

  vector<tuple<long long, long long, long long>> circles(n);
  long long xi, yi, ri;
  for (int i = 0; i < n; ++i) {
    cin >> xi >> yi >> ri;
    xi -= x0;
    yi -= y00;
    circles[i] = make_tuple(xi, yi, ri);
    if (xi*xi + yi*yi <= ri*ri) {
      printf("%.10lf\n", 1.0);
      return 0;
    }
  }

  vector<pair<double,double>> angles;
  for (int i = 0; i < n; ++i) {
    tie(xi, yi, ri) = circles[i];
    long long di2 = xi*xi + yi*yi;
    double di = sqrt(di2);

    // Circles do not intersect or intersect in one point
    if (di >= r0 + ri)
      continue;

    if (ri == 0)
      continue;

    // Length of segment to tangent point
    double h = sqrt(di2 - ri*ri);

    double alpha;
    // Tangent points are inside reachable circle
    if (r0 > h)
      alpha = angle(h, di, ri);
    else
      alpha = angle(r0, di, ri);

    // Angle until center of circle
    double alphacenter = angle(sqrt(di2), fabs(xi), fabs(yi));
    if (xi <= 0 and yi >= 0)
      alphacenter = PI - alphacenter;
    else if (xi <= 0 and yi <= 0)
      alphacenter += PI;
    else if (xi >= 0 and yi <= 0)
      alphacenter = 2.0*PI - alphacenter;

    double alphalow = alphacenter - alpha;
    double alphaup = alphacenter + alpha;
    if (alphalow < 0) {
      angles.emplace_back(2.*PI+alphalow, 2.*PI);
      angles.emplace_back(0, alphaup);
    } else if (alphaup > 2.*PI) {
      angles.emplace_back(alphalow, 2.*PI);
      angles.emplace_back(0, alphaup - 2.*PI);
    } else {
      angles.emplace_back(alphalow, alphaup);
    }
  }

  if (angles.size() == 0) {
    printf("%.10lf\n", 0.0);
    return 0;
  }

  sort(angles.begin(), angles.end());
  double upperbound = angles[0].second;
  double sum = angles[0].second - angles[0].first;
  for (int i = 1; i < (int) angles.size(); ++i) {
    double l, r;
    tie(l, r) = angles[i];
    if (r < upperbound)
      continue;
    l = max(upperbound, l);
    sum += r - l;
    upperbound = max(r, upperbound);
  }

  printf("%.10lf\n", sum/(2.*PI));

  return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef pair<double,double> PDD;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

const double PI=acos(-1);

int sgn(double x, double e=1e-10) { return x<-e?-1:x>e; }
double sqr(double x) { return x*x; }

struct Point {
    double x=0, y=0;
    Point() {}
    Point(double _x, double _y) : x(_x), y(_y) {}
    void read() { scanf("%lf%lf", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    double sq_len() const { return x*x+y*y; }
    double len() const { return sqrt(sq_len()); }
    double ang() const { return atan2(y, x); }

    friend double dis(Point p1, Point p2) { return (p1-p2).len(); }
};

int cross_cc(Point p1, double r1, Point p2, double r2, Point* o1, Point* o2) {
	double mx=p2.x-p1.x, sx=p2.x+p1.x, mx2=mx*mx;
	double my=p2.y-p1.y, sy=p2.y+p1.y, my2=my*my;
	double sq=mx2+my2, d=-(sq-sqr(r1-r2))*(sq-sqr(r1+r2));
	if(sgn(d)<0) return 0; if(sgn(d)==0) d=0; else d=sqrt(d);
	double x=mx*((r1+r2)*(r1-r2) + mx*sx) + sx*my2;
	double y=my*((r1+r2)*(r1-r2) + my*sy) + sy*mx2;
	double dx=mx*d, dy=my*d; sq*=2.;
	*o1=Point((x-dy)/sq, (y+dx)/sq);
	*o2=Point((x+dy)/sq, (y-dx)/sq);
	if(sgn(d)>0) return 2; else return 1;
}

double tang_dis(Point p1, double r1, Point p) {
	return (p1-p).sq_len()-r1*r1;
}

void tang_point(Point p1, double r1, Point p, Point* t1, Point* t2) {
	double x=tang_dis(p1, r1, p);
	if(sgn(x)<0) printf("ERROR!\n");
	if(sgn(x)==0) { *t1=*t2=p; return; }
	x=sqrt(x); cross_cc(p1, r1, p, x, t1, t2);
}

PDD normalize(PDD a) {
    if(a.fi>a.se) swap(a.fi, a.se);
    if(a.se-a.fi>PI) a.se-=PI*2, swap(a.fi, a.se);
    return a;
}

double solve() {
    Point p0; p0.read();
    double v, t; scanf("%lf%lf", &v,&t);
    const double s=v*t;

    vector<PDD> intervals;
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        double r; scanf("%lf", &r);
        if(sgn(dis(p, p0)-r)<=0) return 1.;

        double d=min(s, tang_dis(p, r, p0));
        Point p1, p2;
        if(cross_cc(p, r, p0, d, &p1, &p2)<2) continue;

        PDD ang=normalize(mp((p1-p0).ang(), (p2-p0).ang()));
        intervals.pb(mp(max(ang.fi, -PI), ang.se));
        if(ang.fi<-PI) {
            intervals.pb(mp(ang.fi+PI*2, min(PI, ang.se+PI*2)));
        }
    }
    sort(all(intervals));
    double la=-PI, ans=0;
    for(const auto& p: intervals) {
        //printf("[%.2lf, %.2lf]\n",p.fi/PI,p.se/PI);
        setmax(la, p.fi);
        ans+=max(0., p.se-la);
        setmax(la, p.se);
    }
    return ans/PI/2;
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

typedef long double LD;
typedef pair<LD,LD> PDD;
const LD PI=acos(-1);

struct Point {
    LL x=0, y=0;
    Point() {}
    Point(LL _x, LL _y) : x(_x), y(_y) {}
    void read() { scanf("%lld%lld", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    LL sq_len() const { return x*x+y*y; }

    LD len() const { return sqrt(sq_len()); }
    LD ang() const { return atan2(y, x); }
};

LD angle(LL a2, LL b2, LL c2) {
    LD u=b2+c2-a2;
    LD d=sqrt(b2*c2)*2;
    return acos(u/d);
}

double solve() {
    Point p0; p0.read();
    LL v, t; scanf("%lld%lld", &v,&t);
    const LL s=v*t;

    vector<PDD> intervals;
    auto add=[&](LD x, LD y) {
        setmax(x, -PI); setmin(y, PI);
        if(x<y) intervals.emplace_back(x, y);
    };
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        LL r; scanf("%lld", &r);

        const LL r2=r*r;
        const LL d2=(p-p0).sq_len();
        if(d2<=r2) return 1.0;
        LL x2=d2-r2;
        if(s<=x2/s) x2=s*s;
        const LD width=angle(r2, d2, x2);

        const LD ang=(p-p0).ang();
        const LD ang1=ang-width, ang2=ang+width;
        add(ang1, ang2);
        add(ang1-PI*2, ang2-PI*2);
        add(ang1+PI*2, ang2+PI*2);
    }
    sort(all(intervals));
    LD la=-PI, ans=0;
    for(const auto& p: intervals) {
        if(p.se>la) {
            ans+=p.se-max(la, p.fi);
            la=p.se;
        }
    }
    return double(ans/PI/2);
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

typedef long double LD;
typedef pair<LD,LD> PDD;
const LD PI=acos(-1);

struct Point {
    LL x=0, y=0;
    Point() {}
    Point(LL _x, LL _y) : x(_x), y(_y) {}
    void read() { scanf("%lld%lld", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    LL sq_len() const { return x*x+y*y; }

    LD len() const { return sqrt(sq_len()); }
    LD ang() const { return atan2(y, x); }
};

LD angle(LL a2, LL b2, LL c2) {
    LD u=b2+c2-a2;
    LD d=sqrt(b2*c2)*2;
    return acos(u/d);
}

double solve() {
    Point p0; p0.read();
    LL v, t; scanf("%lld%lld", &v,&t);
    const LL s=v*t;

    vector<PDD> intervals;
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        LL r; scanf("%lld", &r);

        const LL r2=r*r;
        const LL d2=(p-p0).sq_len();
        if(d2<=r2) return 1.0;
        LL x2=d2-r2;
        if(s<x2/s) x2=s*s;
        const LD width=angle(r2, d2, x2);

        const LD ang=(p-p0).ang();
        const LD ang1=ang-width, ang2=ang+width;
        intervals.emplace_back(ang1, ang2);
        intervals.emplace_back(ang1-PI*2, ang2-PI*2);
        intervals.emplace_back(ang1+PI*2, ang2+PI*2);
    }
    sort(all(intervals));
    LD la=-PI, ans=0;
    for(const auto& p: intervals) {
        setmax(la, p.fi);
        LD en=max(la, min(p.se, PI));
        ans+=en-la; la=en;
    }
    return double(ans/PI/2);
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

typedef long double LD;
typedef pair<LD,LD> PDD;
const LD PI=acos(-1);

struct Point {
    LL x=0, y=0;
    Point() {}
    Point(LL _x, LL _y) : x(_x), y(_y) {}
    void read() { scanf("%lld%lld", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    LL sq_len() const { return x*x+y*y; }

    LD len() const { return sqrt(sq_len()); }
    LD ang() const { return atan2(y, x); }
};

LD angle(LL a2, LL b2, LL c2) {
    LD u=b2+c2-a2;
    LD d=sqrt(b2*c2)*2;
    return acos(u/d);
}

double solve() {
    Point p0; p0.read();
    LL v, t; scanf("%lld%lld", &v,&t);
    const LL s=v*t;

    vector<PDD> intervals;
    auto add=[&](LD x, LD y) {
        setmax(x, -PI); setmin(y, PI);
        if(x<y) intervals.emplace_back(x, y);
    };
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        LL r; scanf("%lld", &r);

        const LL r2=r*r;
        const LL d2=(p-p0).sq_len();
        if(d2<=r2) return 1.0;
        LL x2=d2-r2;
        if(s<=x2/s) x2=s*s;
        if(sqrt(d2)>=sqrt(r2)+sqrt(x2)) continue;
        const LD width=angle(r2, d2, x2);

        const LD ang=(p-p0).ang();
        const LD ang1=ang-width, ang2=ang+width;
        add(ang1, ang2);
        add(ang1-PI*2, ang2-PI*2);
        add(ang1+PI*2, ang2+PI*2);
    }
    sort(all(intervals));
    LD la=-PI, ans=0;
    for(const auto& p: intervals) {
        if(p.se>la) {
            ans+=p.se-max(la, p.fi);
            la=p.se;
        }
    }
    return double(ans/PI/2);
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

typedef long double LD;
typedef pair<LD,LD> PDD;
const LD PI=acos(-1);

struct Point {
    LL x=0, y=0;
    Point() {}
    Point(LL _x, LL _y) : x(_x), y(_y) {}
    void read() { scanf("%lld%lld", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    LL sq_len() const { return x*x+y*y; }
    LD ang() const { return atan2(y, x); }
};

LD angle(LL a2, LL b2, LL c2) {
    LD x=(LD(b2)+LD(c2)-a2)/(sqrt(LD(b2))*sqrt(LD(c2))*2);
    if(x>1) x=1;
    if(x<-1) x=-1;
    return acos(x);
}

double solve() {
    Point p0; p0.read();
    LL v, t; scanf("%lld%lld", &v,&t);
    const LL s=v*t;

    vector<PDD> intervals;
    auto add=[&](LD x, LD y) {
        setmax(x, -PI); setmin(y, PI);
        if(x<y) intervals.emplace_back(x, y);
    };
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        LL r; scanf("%lld", &r);

        const LL r2=r*r;
        const LL d2=(p-p0).sq_len();
        if(d2<=r2) return 1.0;
        if(r+s==0) {
            if(d2>0) continue;
        } else {
            if((r+s)<=d2/(r+s)) continue;
        }
        LL x2=d2-r2;
        if(s==0 || s<=x2/s) x2=s*s;
        const LD width=angle(r2, d2, x2);

        const LD ang=(p-p0).ang();
        const LD ang1=ang-width, ang2=ang+width;
        add(ang1, ang2);
        add(ang1-PI*2, ang2-PI*2);
        add(ang1+PI*2, ang2+PI*2);
    }
    sort(all(intervals));
    LD la=-PI, ans=0;
    for(const auto& p: intervals) {
        if(p.se>la) {
            ans+=p.se-max(la, p.fi);
            la=p.se;
        }
    }
    return double(ans/PI/2);
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

typedef long double LD;
typedef pair<LD,LD> PDD;
const LD PI=acos(-1);

struct Point {
    LL x=0, y=0;
    Point() {}
    Point(LL _x, LL _y) : x(_x), y(_y) {}
    void read() { scanf("%lld%lld", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    LL sq_len() const { return x*x+y*y; }
    LD ang() const { return atan2(y, x); }
};

LD angle(LL a2, LL b2, LL c2) {
    LD x=LD(b2+c2-a2)/(sqrt(b2*c2)*2);
    if(x>1) x=1;
    if(x<-1) x=-1;
    return acos(x);
}

double solve() {
    Point p0; p0.read();
    LL v, t; scanf("%lld%lld", &v,&t);
    const LL s=v*t;

    vector<PDD> intervals;
    auto add=[&](LD x, LD y) {
        setmax(x, -PI); setmin(y, PI);
        if(x<y) intervals.emplace_back(x, y);
    };
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        LL r; scanf("%lld", &r);

        const LL r2=r*r;
        const LL d2=(p-p0).sq_len();
        if(d2<=r2) return 1.0;
        if(r+s==0) {
            if(d2>0) continue;
        } else {
            if((r+s)<=d2/(r+s)) continue;
        }
        LL x2=d2-r2;
        if(s==0 || s<=x2/s) x2=s*s;
        const LD width=angle(r2, d2, x2);

        const LD ang=(p-p0).ang();
        const LD ang1=ang-width, ang2=ang+width;
        add(ang1, ang2);
        add(ang1-PI*2, ang2-PI*2);
        add(ang1+PI*2, ang2+PI*2);
    }
    sort(all(intervals));
    LD la=-PI, ans=0;
    for(const auto& p: intervals) {
        if(p.se>la) {
            ans+=p.se-max(la, p.fi);
            la=p.se;
        }
    }
    return double(ans/PI/2);
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

typedef long double LD;
typedef pair<LD,LD> PDD;
const LD PI=acos(-1);

struct Point {
    LL x=0, y=0;
    Point() {}
    Point(LL _x, LL _y) : x(_x), y(_y) {}
    void read() { scanf("%lld%lld", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    LL sq_len() const { return x*x+y*y; }
    LD ang() const { return atan2(y, x); }
};

LD angle(LL a2, LL b2, LL c2) {
    LD x=LD(b2+c2-a2)/(sqrt(b2*c2)*2);
    if(x>1) x=1;
    if(x<-1) x=-1;
    return acos(x);
}

double solve() {
    Point p0; p0.read();
    LL v, t; scanf("%lld%lld", &v,&t);
    const LL s=v*t;

    vector<PDD> intervals;
    auto add=[&](LD x, LD y) {
        setmax(x, -PI); setmin(y, PI);
        if(x<y) intervals.emplace_back(x, y);
    };
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        LL r; scanf("%lld", &r);

        const LL r2=r*r;
        const LL d2=(p-p0).sq_len();
        if(d2<=r2) return 1.0;
        if((r+s)*(r+s)<=d2) continue;
        LL x2=d2-r2;
        if(s<=x2/s) x2=s*s;
        const LD width=angle(r2, d2, x2);

        const LD ang=(p-p0).ang();
        const LD ang1=ang-width, ang2=ang+width;
        add(ang1, ang2);
        add(ang1-PI*2, ang2-PI*2);
        add(ang1+PI*2, ang2+PI*2);
    }
    sort(all(intervals));
    LD la=-PI, ans=0;
    for(const auto& p: intervals) {
        if(p.se>la) {
            ans+=p.se-max(la, p.fi);
            la=p.se;
        }
    }
    return double(ans/PI/2);
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

#define sz(a) static_cast<int>(a.size())
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=int(b); --i)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fillchar(a, x) memset(a, x, sizeof(a))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<string> VS;
template<class T> bool setmax(T &_a, T _b) { if(_b>_a) { _a=_b; return true; } return false; }
template<class T> bool setmin(T &_a, T _b) { if(_b<_a) { _a=_b; return true; } return false; }
template<class T> T gcd(T _a, T _b) { return _b==0?_a:gcd(_b,_a%_b); }

typedef long double LD;
typedef pair<LD,LD> PDD;
const LD PI=acos(-1);

struct Point {
    LL x=0, y=0;
    Point() {}
    Point(LL _x, LL _y) : x(_x), y(_y) {}
    void read() { scanf("%lld%lld", &x,&y); }
    Point operator+(const Point& p) const { return Point(x+p.x, y+p.y); }
    Point operator-(const Point& p) const { return Point(x-p.x, y-p.y); }
    LL sq_len() const { return x*x+y*y; }
    LD ang() const { return atan2(y, x); }
};

LD angle(LL a2, LL b2, LL c2) {
    LD x=LD(b2+c2-a2)/(sqrt(b2*c2)*2);
    if(x>1) x=1;
    if(x<-1) x=-1;
    return acos(x);
}

double solve() {
    Point p0; p0.read();
    LL v, t; scanf("%lld%lld", &v,&t);
    const LL s=v*t;

    vector<PDD> intervals;
    auto add=[&](LD x, LD y) {
        setmax(x, -PI); setmin(y, PI);
        if(x<y) intervals.emplace_back(x, y);
    };
    int n; scanf("%d", &n);
    repn(i, n) {
        Point p; p.read();
        LL r; scanf("%lld", &r);

        const LL r2=r*r;
        const LL d2=(p-p0).sq_len();
        if(d2<=r2) return 1.0;
        if(r+s==0) {
            if(d2>0) continue;
        } else {
            if((r+s)<=d2/(r+s)) continue;
        }
        LL x2=d2-r2;
        if(s<=x2/s) x2=s*s;
        const LD width=angle(r2, d2, x2);

        const LD ang=(p-p0).ang();
        const LD ang1=ang-width, ang2=ang+width;
        add(ang1, ang2);
        add(ang1-PI*2, ang2-PI*2);
        add(ang1+PI*2, ang2+PI*2);
    }
    sort(all(intervals));
    LD la=-PI, ans=0;
    for(const auto& p: intervals) {
        if(p.se>la) {
            ans+=p.se-max(la, p.fi);
            la=p.se;
        }
    }
    return double(ans/PI/2);
}

int main() {
    double ans=solve();
    printf("%.9lf\n", ans);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ll> point;
const int MAXN = 1e5 + 10;
const double PI = acos(-1.0);

void read (point &p) {
	ll x, y;
	scanf("%lld %lld", &x, &y);
	p = point(x, y);
}

ull sqr (ll x) {
	return x * x;
}

point C;
ll D;
int N;
point A[MAXN];
ll R[MAXN];
double angs[MAXN];
map<double, int> mp;

double regang (double d) {
	while (d < 0) {
		d += 2 * PI;
	}

	while (d > 2 * PI) {
		d -= 2 * PI;
	}
	return d;
}

int main() {
	read(C);
	scanf("%lld", &D);
	int ttt;
	scanf("%d", &ttt);
	D = min(D * ttt, ll(3e9));

	scanf("%d", &N);
	bool all0 = true;
	for (int i = 0; i < N; i++) {
		read(A[i]);
		scanf("%lld", &R[i]);
		if (norm(A[i] - C) <= sqr(R[i])) {
			puts("1");
			return 0;
		}
		all0 &= !R[i];
	}

	if (all0) {
		puts("0");
		return 0;
	}

	for (int i = 0; i < N; i++) {
		if (R[i] == 0) {
			continue;
		}
		//find the interval which this will stay safe
		//we know it's strictly outside circle
		complex<double> pdiff(A[i].real() - C.real(), A[i].imag() - C.imag());
		double alpha = arg(pdiff);
		double ang;
		ull nrm = sqr(ll(pdiff.real())) + sqr(ll(pdiff.imag()));
		double dst = abs(pdiff);
		//printf("D %lld, A[i] = (%lld, %lld), R[i] = %lld\n", D, A[i].real(), A[i].imag(), R[i]);
		if (ull(nrm) <= sqr(D) + sqr(R[i])) {
			ang = asin(R[i] / dst);
		} else if (sqr(D + R[i]) > nrm) {
			ang = acos((nrm + sqr(D) - sqr(R[i])) / dst / D / 2);	//i forgot the parentheses, and it passed 27 tests before WAing...
			//does this work? Might overflow?? let's see...
		} else {
			continue;
		}
		//printf("Center (%lld, %lld). alpha = %lf, ang = %lf\n", A[i].real(), A[i].imag(), alpha, ang);

		//is ang acute?
		double a1 = regang(alpha - ang), a2 = regang(alpha + ang);
		if (a1 < a2) {
			mp[a1]++;
			mp[a2]--;
		} else {
			mp[0]++;
			mp[a2]--;
			mp[a1]++;
			mp[2 * PI]--;
		}
	}

	double ans = 0;
	int psum = 0;
	for (auto it = mp.begin(); it != mp.end(); it++) {
		psum += it -> second;
		if (psum) {
			ans += next(it) -> first - it -> first;
		}
	}
	printf("%.10lf\n", ans / (2 * PI));
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ll> point;
const int MAXN = 1e5 + 10;
const double PI = acos(-1.0);

void read (point &p) {
	ll x, y;
	scanf("%lld %lld", &x, &y);
	p = point(x, y);
}

ull sqr (ll x) {
	return x * x;
}

point C;
ll D;
int N;
point A[MAXN];
ll R[MAXN];
double angs[MAXN];
map<double, int> mp;

double regang (double d) {
	while (d < 0) {
		d += 2 * PI;
	}

	while (d > 2 * PI) {
		d -= 2 * PI;
	}
	return d;
}

int main() {
	read(C);
	scanf("%lld", &D);
	int ttt;
	scanf("%d", &ttt);
	D = min(D * ttt, ll(3e9));

	scanf("%d", &N);
	bool all0 = true;
	for (int i = 0; i < N; i++) {
		read(A[i]);
		scanf("%lld", &R[i]);
		if (norm(A[i] - C) <= sqr(R[i])) {
			puts("1");
			return 0;
		}
		all0 &= !R[i];
	}

	if (all0) {
		puts("0");
		return 0;
	}

	for (int i = 0; i < N; i++) {
		//find the interval which this will stay safe
		//we know it's strictly outside circle
		complex<double> pdiff(A[i].real() - C.real(), A[i].imag() - C.imag());
		double alpha = arg(pdiff);
		double ang;
		ull nrm = sqr(ll(pdiff.real())) + sqr(ll(pdiff.imag()));
		double dst = abs(pdiff);
		//printf("D %lld, A[i] = (%lld, %lld), R[i] = %lld\n", D, A[i].real(), A[i].imag(), R[i]);
		if (ull(nrm) <= sqr(D) + sqr(R[i])) {
			ang = asin(R[i] / dst);
		} else if (sqr(D + R[i]) > nrm) {
			//ang = acos((nrm + sqr(D) - sqr(R[i])) / dst / D / 2);	//i forgot the parentheses, and it passed 27 tests before WAing...
			ang = acos((dst / D + D / dst - (R[i] / dst) * (R[i] / D)) / 2);
		} else {
			continue;
		}
		//printf("Center (%lld, %lld). alpha = %lf, ang = %lf\n", A[i].real(), A[i].imag(), alpha, ang);

		//is ang acute?
		double a1 = regang(alpha - ang), a2 = regang(alpha + ang);
		if (a1 < a2) {
			mp[a1]++;
			mp[a2]--;
		} else {
			mp[0]++;
			mp[a2]--;
			mp[a1]++;
			mp[2 * PI]--;
		}
	}

	double ans = 0;
	int psum = 0;
	for (auto it = mp.begin(); it != mp.end(); it++) {
		psum += it -> second;
		if (psum) {
			ans += next(it) -> first - it -> first;
		}
	}
	printf("%.10lf\n", ans / (2 * PI));
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ll> point;
const int MAXN = 1e5 + 10;
const double PI = acos(-1.0);

void read (point &p) {
	ll x, y;
	scanf("%lld %lld", &x, &y);
	p = point(x, y);
}

ull sqr (ll x) {
	return x * x;
}

point C;
ll D;
int N;
point A[MAXN];
ll R[MAXN];
double angs[MAXN];
map<double, int> mp;

double regang (double d) {
	while (d < 0) {
		d += 2 * PI;
	}

	while (d > 2 * PI) {
		d -= 2 * PI;
	}
	return d;
}

int main() {
	read(C);
	scanf("%lld", &D);
	int ttt;
	scanf("%d", &ttt);
	D = min(D * ttt, ll(3e9));

	scanf("%d", &N);
	bool all0 = true;
	for (int i = 0; i < N; i++) {
		read(A[i]);
		scanf("%lld", &R[i]);
		if (norm(A[i] - C) <= sqr(R[i])) {
			puts("1");
			return 0;
		}
		all0 &= !R[i];
	}

	if (all0) {
		puts("ALLZERO");
		puts("0");
		return 0;
	}

	for (int i = 0; i < N; i++) {
		//find the interval which this will stay safe
		//we know it's strictly outside circle
		complex<double> pdiff(A[i].real() - C.real(), A[i].imag() - C.imag());
		double alpha = arg(pdiff);
		double ang;
		ull nrm = sqr(ll(pdiff.real())) + sqr(ll(pdiff.imag()));
		double dst = abs(pdiff);
		//printf("D %lld, A[i] = (%lld, %lld), R[i] = %lld\n", D, A[i].real(), A[i].imag(), R[i]);
		if (ull(nrm) <= sqr(D) + sqr(R[i])) {
			ang = asin(R[i] / dst);
		} else if (sqr(D + R[i]) > nrm) {
			ang = acos(nrm + sqr(D) - sqr(R[i]) / dst / D / 2);
		} else {
			continue;
		}
		//printf("Center (%lld, %lld). alpha = %lf, ang = %lf\n", A[i].real(), A[i].imag(), alpha, ang);

		//is ang acute?
		double a1 = regang(alpha - ang), a2 = regang(alpha + ang);
		if (a1 < a2) {
			mp[a1]++;
			mp[a2]--;
		} else {
			mp[0]++;
			mp[a2]--;
			mp[a1]++;
			mp[2 * PI]--;
		}
	}

	double ans = 0;
	int psum = 0;
	for (auto it = mp.begin(); it != mp.end(); it++) {
		psum += it -> second;
		if (psum) {
			ans += next(it) -> first - it -> first;
		}
	}
	printf("%.10lf\n", ans / (2 * PI));
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ll> point;
const int MAXN = 1e5 + 10;
const double PI = acos(-1.0);

void read (point &p) {
	ll x, y;
	scanf("%lld %lld", &x, &y);
	p = point(x, y);
}

ull sqr (ll x) {
	return x * x;
}

point C;
ll D;
int N;
point A[MAXN];
ll R[MAXN];
double angs[MAXN];
map<double, int> mp;

double regang (double d) {
	while (d < 0) {
		d += 2 * PI;
	}

	while (d > 2 * PI) {
		d -= 2 * PI;
	}
	return d;
}

int main() {
	read(C);
	scanf("%lld", &D);
	int ttt;
	scanf("%d", &ttt);
	D = min(D * ttt, ll(3e9));

	scanf("%d", &N);
	bool all0 = true;
	for (int i = 0; i < N; i++) {
		read(A[i]);
		scanf("%lld", &R[i]);
		if (norm(A[i] - C) <= sqr(R[i])) {
			puts("1");
			return 0;
		}
		all0 &= !R[i];
	}

	if (all0) {
		puts("0");
		return 0;
	}

	for (int i = 0; i < N; i++) {
		//find the interval which this will stay safe
		//we know it's strictly outside circle
		complex<double> pdiff(A[i].real() - C.real(), A[i].imag() - C.imag());
		double alpha = arg(pdiff);
		double ang;
		ull nrm = sqr(ll(pdiff.real())) + sqr(ll(pdiff.imag()));
		double dst = abs(pdiff);
		//printf("D %lld, A[i] = (%lld, %lld), R[i] = %lld\n", D, A[i].real(), A[i].imag(), R[i]);
		if (ull(nrm) <= sqr(D) + sqr(R[i])) {
			ang = asin(R[i] / dst);
			assert(ang == ang);
			assert(ang > 0 && ang < PI / 2);
		} else if (sqr(D + R[i]) > nrm) {
			//ang = acos((nrm + sqr(D) - sqr(R[i])) / dst / D / 2);	//i forgot the parentheses, and it passed 27 tests before WAing...
			ang = acos((dst / D + D / dst - (R[i] / dst) * (R[i] / D)) / 2);
			assert(ang == ang);
			assert(ang > 0 && ang < PI / 2);
		} else {
			continue;
		}
		//printf("Center (%lld, %lld). alpha = %lf, ang = %lf\n", A[i].real(), A[i].imag(), alpha, ang);

		//is ang acute?
		double a1 = regang(alpha - ang), a2 = regang(alpha + ang);
		if (a1 < a2) {
			mp[a1]++;
			mp[a2]--;
		} else {
			mp[0]++;
			mp[a2]--;
			mp[a1]++;
			mp[2 * PI]--;
		}
	}

	double ans = 0;
	int psum = 0;
	for (auto it = mp.begin(); it != mp.end(); it++) {
		psum += it -> second;
		if (psum) {
			ans += next(it) -> first - it -> first;
		}
	}
	printf("%.10lf\n", ans / (2 * PI));
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ll> point;
const int MAXN = 1e5 + 10;
const double PI = acos(-1.0);

void read (point &p) {
	ll x, y;
	scanf("%lld %lld", &x, &y);
	p = point(x, y);
}

ull sqr (ll x) {
	return x * x;
}

point C;
ll D;
int N;
point A[MAXN];
ll R[MAXN];
double angs[MAXN];
map<double, int> mp;

double regang (double d) {
	while (d < 0) {
		d += 2 * PI;
	}

	while (d > 2 * PI) {
		d -= 2 * PI;
	}
	return d;
}

int main() {
	read(C);
	scanf("%lld", &D);
	int ttt;
	scanf("%d", &ttt);
	D = min(D * ttt, ll(3e9));

	scanf("%d", &N);
	bool all0 = true;
	for (int i = 0; i < N; i++) {
		read(A[i]);
		scanf("%lld", &R[i]);
		if (norm(A[i] - C) <= sqr(R[i])) {
			puts("1");
			return 0;
		}
		all0 &= !R[i];
	}

	if (all0) {
		puts("0");
		return 0;
	}

	for (int i = 0; i < N; i++) {
		//find the interval which this will stay safe
		//we know it's strictly outside circle
		complex<double> pdiff(A[i].real() - C.real(), A[i].imag() - C.imag());
		double alpha = arg(pdiff);
		double ang;
		ull nrm = sqr(ll(pdiff.real())) + sqr(ll(pdiff.imag()));
		double dst = abs(pdiff);
		//printf("D %lld, A[i] = (%lld, %lld), R[i] = %lld\n", D, A[i].real(), A[i].imag(), R[i]);
		if (ull(nrm) <= sqr(D) + sqr(R[i])) {
			ang = asin(R[i] / dst);
		} else if (sqr(D + R[i]) > nrm) {
			ang = acos((nrm + sqr(D) - sqr(R[i])) / dst / D / 2);	//i forgot the parentheses, and it passed 27 tests before WAing...
		} else {
			continue;
		}
		//printf("Center (%lld, %lld). alpha = %lf, ang = %lf\n", A[i].real(), A[i].imag(), alpha, ang);

		//is ang acute?
		double a1 = regang(alpha - ang), a2 = regang(alpha + ang);
		if (a1 < a2) {
			mp[a1]++;
			mp[a2]--;
		} else {
			mp[0]++;
			mp[a2]--;
			mp[a1]++;
			mp[2 * PI]--;
		}
	}

	double ans = 0;
	int psum = 0;
	for (auto it = mp.begin(); it != mp.end(); it++) {
		psum += it -> second;
		if (psum) {
			ans += next(it) -> first - it -> first;
		}
	}
	printf("%.10lf\n", ans / (2 * PI));
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ll> point;
const int MAXN = 1e5 + 10;
const double PI = acos(-1.0);

void read (point &p) {
	ll x, y;
	scanf("%lld %lld", &x, &y);
	p = point(x, y);
}

ull sqr (ll x) {
	return x * x;
}

point C;
ll D;
int N;
point A[MAXN];
ll R[MAXN];
double angs[MAXN];
map<double, int> mp;

double regang (double d) {
	while (d < 0) {
		d += 2 * PI;
	}

	while (d > 2 * PI) {
		d -= 2 * PI;
	}
	return d;
}

int main() {
	read(C);
	scanf("%lld", &D);
	int ttt;
	scanf("%d", &ttt);
	D = min(D * ttt, ll(3e9));

	scanf("%d", &N);
	bool all0 = true;
	for (int i = 0; i < N; i++) {
		read(A[i]);
		scanf("%lld", &R[i]);
		if (norm(A[i] - C) <= sqr(R[i])) {
			puts("1");
			return 0;
		}
		all0 &= !R[i];
	}

	if (all0) {
		puts("0");
		return 0;
	}

	for (int i = 0; i < N; i++) {
		//find the interval which this will stay safe
		//we know it's strictly outside circle
		complex<double> pdiff(A[i].real() - C.real(), A[i].imag() - C.imag());
		double alpha = arg(pdiff);
		double ang;
		ull nrm = sqr(ll(pdiff.real())) + sqr(ll(pdiff.imag()));
		double dst = abs(pdiff);
		//printf("D %lld, A[i] = (%lld, %lld), R[i] = %lld\n", D, A[i].real(), A[i].imag(), R[i]);
		if (ull(nrm) <= sqr(D) + sqr(R[i])) {
			ang = asin(R[i] / dst);
			assert(ang == ang);
		} else if (sqr(D + R[i]) > nrm) {
			//ang = acos((nrm + sqr(D) - sqr(R[i])) / dst / D / 2);	//i forgot the parentheses, and it passed 27 tests before WAing...
			ang = acos((dst / D + D / dst - (R[i] / dst) * (R[i] / D)) / 2);
			assert(ang == ang);
		} else {
			continue;
		}
		//printf("Center (%lld, %lld). alpha = %lf, ang = %lf\n", A[i].real(), A[i].imag(), alpha, ang);

		//is ang acute?
		double a1 = regang(alpha - ang), a2 = regang(alpha + ang);
		if (a1 < a2) {
			mp[a1]++;
			mp[a2]--;
		} else {
			mp[0]++;
			mp[a2]--;
			mp[a1]++;
			mp[2 * PI]--;
		}
	}

	double ans = 0;
	int psum = 0;
	for (auto it = mp.begin(); it != mp.end(); it++) {
		psum += it -> second;
		if (psum) {
			ans += next(it) -> first - it -> first;
		}
	}
	printf("%.10lf\n", ans / (2 * PI));
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef complex<ll> point;
const int MAXN = 1e5 + 10;
const double PI = acos(-1.0);

void read (point &p) {
	ll x, y;
	scanf("%lld %lld", &x, &y);
	p = point(x, y);
}

ull sqr (ll x) {
	return x * x;
}

point C;
ll D;
int N;
point A[MAXN];
ll R[MAXN];
double angs[MAXN];
map<double, int> mp;

double regang (double d) {
	while (d < 0) {
		d += 2 * PI;
	}

	while (d > 2 * PI) {
		d -= 2 * PI;
	}
	return d;
}

int main() {
	read(C);
	scanf("%lld", &D);
	int ttt;
	scanf("%d", &ttt);
	D = min(D * ttt, ll(3e9));

	scanf("%d", &N);
	bool all0 = true;
	for (int i = 0; i < N; i++) {
		read(A[i]);
		scanf("%lld", &R[i]);
		if (norm(A[i] - C) <= sqr(R[i])) {
			puts("1");
			return 0;
		}
		all0 &= !R[i];
	}

	if (all0) {
		puts("0");
		return 0;
	}

	for (int i = 0; i < N; i++) {
		//find the interval which this will stay safe
		//we know it's strictly outside circle
		complex<double> pdiff(A[i].real() - C.real(), A[i].imag() - C.imag());
		double alpha = arg(pdiff);
		double ang;
		ull nrm = sqr(ll(pdiff.real())) + sqr(ll(pdiff.imag()));
		double dst = abs(pdiff);
		//printf("D %lld, A[i] = (%lld, %lld), R[i] = %lld\n", D, A[i].real(), A[i].imag(), R[i]);
		if (ull(nrm) <= sqr(D) + sqr(R[i])) {
			ang = asin(R[i] / dst);
			assert(ang == ang);
			if (ang <= 0 || ang >= PI / 2) {
				printf("line 76 bad %lf\n", ang);
			}
			assert(ang > 0 && ang < PI / 2);
		} else if (sqr(D + R[i]) > nrm) {
			//ang = acos((nrm + sqr(D) - sqr(R[i])) / dst / D / 2);	//i forgot the parentheses, and it passed 27 tests before WAing...
			ang = acos((dst / D + D / dst - (R[i] / dst) * (R[i] / D)) / 2);
			assert(ang == ang);
			if (ang <= 0 || ang >= PI / 2) {
				printf("line 84 bad %lf\n", ang);
			}
			assert(ang > 0 && ang < PI / 2);
		} else {
			continue;
		}
		//printf("Center (%lld, %lld). alpha = %lf, ang = %lf\n", A[i].real(), A[i].imag(), alpha, ang);

		//is ang acute?
		double a1 = regang(alpha - ang), a2 = regang(alpha + ang);
		if (a1 < a2) {
			mp[a1]++;
			mp[a2]--;
		} else {
			mp[0]++;
			mp[a2]--;
			mp[a1]++;
			mp[2 * PI]--;
		}
	}

	double ans = 0;
	int psum = 0;
	for (auto it = mp.begin(); it != mp.end(); it++) {
		psum += it -> second;
		if (psum) {
			ans += next(it) -> first - it -> first;
		}
	}
	printf("%.10lf\n", ans / (2 * PI));
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) >= (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            if(debug)
            {
               cout << "wahhh" << endl;
            }
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;
         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(stack.size() > 0 && p.first <= stack.front().second)
            while(stack.size() > 0 && p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) >= (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            if(debug)
            {
               cout << "wahhh" << endl;
            }
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;
         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            while(stack.size() > 0 && p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) >= (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ll r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) > (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            ld a = r0*r0-r[i]*r[i]+d;
            a /= 2*sqrt(d);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   int dx = x1-x2;
   int dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ll r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(d >= (r0+r[i])*(r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         if(sqrt(d) <= abs(r0-r[i]))
         {
            angle = asin(r[i]/sqrt(d));
         }
         // circles intersect
         else
         {
            ld a = r0*r0-r[i]*r[i]+d;
            a /= 2*sqrt(d);
            angle = acos(a/r0);
         }
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
   //   for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ld EPS = 1e-9;
bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, int>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) > (r0+r[i])+EPS) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;
         if(op1 > op2)
         {
            //list.pb(make_pair(op1, 2*pi));
            //list.pb(make_pair(0, op2));
            list.pb(make_pair(op1, 1));
            list.pb(make_pair(2*pi, -1));
            list.pb(make_pair(0, 1));
            list.pb(make_pair(op2, -1));
         }
         else
         {
            //list.pb(make_pair(op1, op2));
            list.pb(make_pair(op1, 1));
            list.pb(make_pair(op2, -1));
         }
      }
      sort(list.begin(), list.end());
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      ld ret = 0;
      int c = 0;
      ld last = 0;
      for(pair<ld,int> p : list)
      {
         if(c > 0)
         {
            ret += p.first-last;
         }
         c += p.second;
         last = p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ld EPS = 1e-9;
bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, int>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) > (r0+r[i])+EPS) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 >= 2*pi) op2 -= 2*pi;
         if(op1 > op2)
         {
            //list.pb(make_pair(op1, 2*pi));
            //list.pb(make_pair(0, op2));
            list.pb(make_pair(op1, 1));
            list.pb(make_pair(2*pi, -1));
            list.pb(make_pair(0, 1));
            list.pb(make_pair(op2, -1));
         }
         else
         {
            //list.pb(make_pair(op1, op2));
            list.pb(make_pair(op1, 1));
            list.pb(make_pair(op2, -1));
         }
      }
      sort(list.begin(), list.end());
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      ld ret = 0;
      int c = 0;
      ld last = 0;
      for(pair<ld,int> p : list)
      {
         if(c > 0)
         {
            ret += p.first-last;
         }
         c += p.second;
         last = p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) >= (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0 || debug)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            if(debug)
            {
               cout << "wahhh" << endl;
            }
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;
         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(stack.size() > 0 && p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) >= (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            if(debug)
            {
               cout << "wahhh" << endl;
            }
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }

         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 >= 2*pi) op2 -= 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   int dx = x1-x2;
   int dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ll r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(d >= (r0+r[i])*(r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         //if(sqrt(d) <= abs(r0-r[i]))
         //{
            angle = asin(r[i]/sqrt(d));
         //}

         //circles intersect
         /*
         else
         {
            ld a = r0*r0-r[i]*r[i]+d;
            a /= 2*sqrt(d);
            angle = acos(a/r0);
         }
         */
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ll r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      //cout << "what" << endl;
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         //cout << "enter" << endl;
         if(sqrt(d) >= (r0+r[i])) continue;
         //cout << "what" << endl;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            ld a = r0*r0-r[i]*r[i]+d;
            a /= 2*sqrt(d);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) >= (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            ld a = r0*r0-r[i]*r[i]+d;
            a /= 2*sqrt(d);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   int dx = x1-x2;
   int dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ll r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(d >= (r0+r[i])*(r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         if(sqrt(d) <= abs(r0-r[i]))
         {

            angle = asin(r[i]/sqrt(d));
         }
         // circles intersect
         else
         {
            ld a = r0*r0-r[i]*r[i]+d;
            a /= 2*sqrt(d);
            angle = acos(a/r0);
         }
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ld EPS = 1e-9;
bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) > (r0+r[i])+EPS) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }
         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;
         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(stack.size() > 0 && p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

bool debug;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   ll dx = x1-x2;
   ll dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   if(abs(a.second-b.second) < 1e-9) return a.first < b.first;
   return a.second < b.second;
}

int main()
{
   debug = false;
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ld r0 = v*T;
   int n; cin >> n;
   if(x0 == 0 && y0 == 0 && v == 56484 && T == 14541 && n == 95957) debug = true;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(sqrt(d) >= (r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         // fix this
         ld A = r[i]*2;
         ld E = sqrt(d)-r[i];
         ld C = sqrt(E*(A+E));
         if(C < r0)
         {
            angle = asin(r[i]/sqrt(d));
         }
         //circles intersect
         else
         {
            if(debug)
            {
               cout << "wahhh" << endl;
            }
            ld den = 2*sqrt(d);
            ld a = (r0/den)*(r0)-(r[i]/den)*(r[i])+(d/den);
            angle = acos(a/r0);
         }

         //cout << base << ' ' << angle << endl;
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <cctype>
#include <locale>
#include <queue>
#include <utility>
#include <iomanip>

#define forn(n) for(int i = 0; i < n; i++)
#define fornm(n, m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++)
#define pb push_back
#define pf push_front
#define ll long long
#define ld long double
#define pi 3.141592653589793238462643383

using namespace std;

ll dist(ll x1, ll y1, ll x2, ll y2)
{
   int dx = x1-x2;
   int dy = y1-y2;
   return dx*dx+dy*dy;
}

bool cmp(pair<ld, ld> a, pair<ld, ld> b)
{
   return a.second < b.second;
}

int main()
{
   ll x0, y0, v, T; cin >> x0 >> y0 >> v >> T;
   ll r0 = v*T;
   int n; cin >> n;
   ll x[n], y[n], r[n]; forn(n) cin >> x[i] >> y[i] >> r[i];
   //Check if I am contained in a circle
   bool f = false;
   forn(n)
   {
      if(dist(x0, y0, x[i], y[i]) <= r[i]*r[i]) f = true;
   }
   if(f)
   {
      cout << 1 << endl;
   }
   else
   {
      vector<pair<ld, ld>> list;
      forn(n)
      {
         ll d = dist(x0, y0, x[i], y[i]);
         if(d >= (r0+r[i])*(r0+r[i])) continue;
         // circle is contained inside of a circle
         ld base = atan2(y[i]-y0,x[i]-x0);
         if(base < 0) base += 2*pi;
         ld angle = 0;
         //if(sqrt(d) <= abs(r0-r[i]))
         //{
            angle = asin(r[i]/sqrt(d));
         //}
         // circles intersect
         /*
         else
         {
            cout << "what" << endl;
            ld a = r0*r0-r[i]*r[i]+d;
            a /= 2*sqrt(d);
            angle = acos(a/r0);
         }
         */
         ld op1 = base-angle;
         ld op2 = base+angle;
         if(op1 < 0) op1 += 2*pi;
         if(op2 < 0) op2 += 2*pi;

         if(op1 > op2)
         {
            list.pb(make_pair(op1, 2*pi));
            list.pb(make_pair(0, op2));
         }
         else list.pb(make_pair(op1, op2));
      }
      sort(list.begin(), list.end(), cmp);
      //for(pair<ld,ld> p : list) cout << p.first << ' ' << p.second << endl;
      deque<pair<ld, ld>> stack;
      for(pair<ld, ld> p : list)
      {
         if(stack.size() == 0) stack.push_front(p);
         else
         {
            if(p.first <= stack.front().second)
            {
               pair<ld, ld> top = stack.front(); stack.pop_front();
               stack.push_front(make_pair(top.first, p.second));
            }
            else
            {
               stack.push_front(p);
            }
         }
      }
      ld ret = 0;
      while(stack.size() > 0)
      {
         pair<ld, ld> p = stack.front(); stack.pop_front();
         ret += p.second-p.first;
      }
      cout << setprecision(32) << (ret/(2*pi)) << endl;
   }
   return 0;
}