#include /* #include #include namespace mp = boost::multiprecision; using bint = mp::cpp_int; */ #include #include #include #include #include #include #include #include #include #include #define rep(i,n) for (int i = 0; i < int(n); ++i) #define repp(i,n,m) for (int i = m; i < int(n); ++i) #define repb(i,n) for (int i = int(n)-1; i >= 0; --i) #define fi first #define se second #define endl "\n" using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using P = pair; using PL = pair; using Pxy = pair; using pil = pair; using pli = pair; const int INF = 1001001007; const long long mod1 = 1000000007LL; const long long mod2 = 998244353LL; const ll inf = 2e18; const ld pi = 3.14159265358979323; const ld eps = 1e-7; templateistream &operator>>(istream &is,vector &v){for(auto &e:v)is>>e;return is;} templateostream &operator<<(ostream &os,const vector &v){if(v.size()==0){os<istream &operator>>(istream &is,vector> &v){for(auto &e:v)is>>e;return is;} templateostream &operator<<(ostream &os,const vector> &v){if(v.size()==0){os<bool range(T a,T b,T x){return (a<=x&&xbool rrange(T a,T b,T c,T d,T x,T y){return (range(a,c,x)&&range(b,d,y));} templatevoid rev(vector &v){reverse(v.begin(),v.end());} templatevoid sor(vector &v, int f=0){sort(v.begin(),v.end());if(f!=0) rev(v);} templatebool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;} templatebool chmax(T &a,const T &b){if(avoid eru(vector &v){sor(v);v.erase(unique(v.begin(),v.end()),v.end());} templateT cel(T a,T b){if(a%b==0)return a/b;return a/b +1;} templatevoid out2(T a,U b){cout<void mout(T a){cout<eps)cout< dx = {0,1,0,-1}; vector dy = {1,0,-1,0}; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const string alp = "abcdefghijklmnopqrstuvwxyz"; const string num = "0123456789"; ll gcds(ll a, ll b){ a = abs(a); b = abs(b); if (b == 0) return a; ll c = a % b; while (c != 0){ a = b; b = c; c = a % b; } return b; } ll tentou(vector ar){ int n = ar.size(); set st; rep(i,n) st.insert(ar[i]); map mp; int ind = 0; for (ll x : st){ mp[x] = ind; ind++; } fenwick_tree fw(ind); ll ans = 0; rep(i,n){ int a = mp[ar[i]]; ans += i - fw.sum(0,a+1); fw.add(a,1); } return ans; } /* alias g++='g++ -I/mnt/c/Users/Owner/Desktop/ac-library' */ struct vs{ vector to; }; map,vector> mp; vector saiki(int a, int b, int c, int n){ if (mp.find(vector{a,b,c,n}) != mp.end()) return mp[vector{a,b,c,n}]; if (a < 0 || b < 0 || c < 0 || n == 0){ return vector{0.0,0.0,0.0}; } ld x = a * (a - 1) / 2; ld y = b * (b - 1) / 2; ld z = c * (c - 1) / 2; ld w = (a + b + c) * (a + b + c - 1) / 2; vector ans(3,0.0); vector aa = {0.0,0.0,0.0}; if (a >= 2) aa = saiki(a-1,b,c,n-1); vector bb = {0.0,0.0,0.0}; if (b >= 2) bb = saiki(a,b-1,c,n-1); vector cc = {0.0,0.0,0.0}; if (c >= 2) cc = saiki(a,b,c-1,n-1); auto dd = saiki(a,b,c,n-1); aa[0] += 1.0; bb[1] += 1.0; cc[2] += 1.0; rep(i,3) aa[i] *= x / w; rep(i,3) bb[i] *= y / w; rep(i,3) cc[i] *= z / w; rep(i,3) dd[i] *= (w - x - y - z) / w; rep(i,3){ ans[i] += aa[i]; } rep(i,3){ ans[i] += bb[i]; } rep(i,3){ ans[i] += cc[i]; } rep(i,3){ ans[i] += dd[i]; } return mp[vector{a,b,c,n}] = ans; } int main(){ int a, b, c, n; cin >> a >> b >> c >> n; auto ans = saiki(a,b,c,n); dout(); cout << ans; }