#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef vector vl; typedef vector> vvl; typedef pair P; #define rep(i, n) for(ll i = 0; i < n; i++) #define exrep(i, a, b) for(ll i = a; i <= b; i++) #define out(x) cout << x << endl #define exout(x) printf("%.10f\n", x) #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define re0 return 0 const ll mod = 998244353; const ll INF = 1e16; double dp1[51][51][51][51]; double dp2[51][51][51][51]; double dp3[51][51][51][51]; int c2(int x) { return x * (x - 1) / 2; } int main() { int a, b, c, n; cin >> a >> b >> c >> n; rep(i, n) { for(int j1 = a; j1 >= 0; j1--) { for(int j2 = b; j2 >= 0; j2--) { for(int j3 = c; j3 >= 0; j3--) { if(j1 + j2 + j3 <= 1) { continue; } double x1 = 0.0; if(j1 >= 2) { x1 = (double)c2(j1) / (double)c2(j1 + j2 + j3); } double x2 = 0.0; if(j2 >= 2) { x2 = (double)c2(j2) / (double)c2(j1 + j2 + j3); } double x3 = 0.0; if(j3 >= 2) { x3 = (double)c2(j3) / (double)c2(j1 + j2 + j3); } dp1[i+1][j1 - 1][j2][j3] += x1 * (dp1[i][j1][j2][j3] + 1.0); dp2[i+1][j1][j2 - 1][j3] += x2 * (dp2[i][j1][j2][j3] + 1.0); dp3[i+1][j1][j2][j3 - 1] += x3 * (dp3[i][j1][j2][j3] + 1.0); dp1[i+1][j1][j2][j3] += (1.0 - (x1 + x2 + x3)) * dp1[i][j1][j2][j3]; dp2[i+1][j1][j2][j3] += (1.0 - (x1 + x2 + x3)) * dp2[i][j1][j2][j3]; dp3[i+1][j1][j2][j3] += (1.0 - (x1 + x2 + x3)) * dp3[i][j1][j2][j3]; } } } } double ans1 = 0.0; double ans2 = 0.0; double ans3 = 0.0; exrep(j1, 0, a) { exrep(j2, 0, b) { exrep(j3, 0, c) { ans1 += dp1[n][j1][j2][j3]; ans2 += dp2[n][j1][j2][j3]; ans3 += dp3[n][j1][j2][j3]; } } } printf("%.10f %.10f %.10f\n", ans1, ans2, ans3); re0; }