#include "atcoder/modint.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const long long int INF = numeric_limits::max() / 4; const int inf = numeric_limits::max() / 4; const long long int MOD1000000007 = 1000000007; const long long int MOD998244353 = 998244353; const double MATH_PI = 3.1415926535897932; template inline void chmin(T1 &a, const T2 &b) { if (a > b) a = b; } template inline void chmax(T1 &a, const T2 &b) { if (a < b) a = b; } #define lint long long int #define ALL(a) a.begin(),a.end() #define RALL(a) a.rbegin(),a.rend() #define rep(i, n) for(int i=0;i<(int)(n);i++) #define VI vector #define VLL vector #define VC vector #define VB vector #define PI pair #define PLL pair #define VPI vector> #define VPLL vector> #define VVI vector> #define VVPI vecor>> #define VVPILL vector>> #define SUM(v) accumulate(ALL(v), 0LL) #define MIN(v) *min_element(ALL(v)) #define MAX(v) *max_element(ALL(v)) using mint = atcoder::modint998244353; int main() { int a, b, c, n; cin >> a >> b >> c >> n; vector>> dp(a + 1, vector>(b + 1, vector(c + 1, 0.0))); dp[a][b][c] = 1.0; for (int i = 0; i < n; i++) { vector>> ndp(a + 1, vector>(b + 1, vector(c + 1, 0.0))); for (int ia = 0; ia <= a; ia++) { for (int ib = 0; ib <= b; ib++) { for (int ic = 0; ic <= c; ic++) { if (dp[ia][ib][ic] == 0.0) continue; int total = ia + ib + ic; double yo = 1.0; if (ia >= 1) { double p = (double) ia * (ia - 1) / ((double) total * (total - 1)); yo -= p; ndp[ia - 1][ib][ic] += dp[ia][ib][ic] * p; } if (ib >= 1) { double p = (double) ib * (ib - 1) / ((double) total * (total - 1)); yo -= p; ndp[ia][ib - 1][ic] += dp[ia][ib][ic] * p; } if (ic >= 1) { double p = (double) ic * (ic - 1) / ((double) total * (total - 1)); yo -= p; ndp[ia][ib][ic - 1] += dp[ia][ib][ic] * p; } ndp[ia][ib][ic] += dp[ia][ib][ic] * yo; } } } swap(dp, ndp); } double ansa = 0.0; double ansb = 0.0; double ansc = 0.0; for (int ia = 0; ia <= a; ia++) { for (int ib = 0; ib <= b; ib++) { for (int ic = 0; ic <= c; ic++) { ansa += (a - ia) * dp[ia][ib][ic]; ansb += (b - ib) * dp[ia][ib][ic]; ansc += (c - ic) * dp[ia][ib][ic]; } } } printf("%.10f %.10f %.10f", ansa, ansb, ansc); return 0; }