#include #include using namespace std; using namespace atcoder; using lint = long long; using ulint = unsigned long long; #define endl '\n' int const INF = 1<<30; lint const INF64 = 1LL<<61; // lint const mod = 1e9+7; // using mint = modint1000000007; long const mod = 998244353; using mint = modint998244353; lint ceilDiv(lint x, lint y){if(x >= 0){return (x+y-1)/y;}else{return x/y;}} lint floorDiv(lint x, lint y){if(x >= 0){return x/y;}else{return (x-y+1)/y;}} lint Sqrt(lint x){lint upper = 1e9;lint lower = 0;while(upper - lower > 0){lint mid = (1+upper + lower)/2;if(mid * mid > x){upper = mid-1;}else{lower = mid;}}return upper;} lint gcd(lint a,lint b){if(a&v){lint ans = INF64;for(lint i:v){ans = min(ans, i);}return ans;} lint chmax(vector&v){lint ans = -INF64;for(lint i:v){ans = max(ans, i);}return ans;} double dist(double x1, double y1, double x2, double y2){return sqrt(pow(x1-x2, 2) + pow(y1-y2,2));} string toString(lint n){string ans = "";if(n == 0){ans += "0";}else{while(n > 0){int a = n%10;char b = '0' + a;string c = "";c += b;n /= 10;ans = c + ans;}}return ans;} string toString(lint n, lint k){string ans = toString(n);string tmp = "";while(ans.length() + tmp.length() < k){tmp += "0";}return tmp + ans;} vectorprime;void makePrime(lint n){prime.push_back(2);for(lint i=3;i<=n;i+=2){bool chk = true;for(lint j=0;j>; int main(){ int a,b,c,n; cin >> a >> b >> c >> n; vec>>>dp(n+1, vec>>(a+1, vec>(b+1, vec(c+1, 0)))); dp[0][a][b][c] = 1; rep(i, n) { rep(aa, a+1) { rep(bb, b+1) { rep(cc, c+1) { double N = aa + bb + cc; double pa = 0, pb = 0, pc = 0; if(aa >= 2)pa = aa*(aa-1)/(N*(N-1)); if(bb >= 2)pb = bb*(bb-1)/(N*(N-1)); if(cc >= 2)pc = cc*(cc-1)/(N*(N-1)); double P = 1.0 - pa - pb - pc; if(aa > 1) { dp[i+1][aa-1][bb][cc] += dp[i][aa][bb][cc] * pa; } if(bb > 1) { dp[i+1][aa][bb-1][cc] += dp[i][aa][bb][cc] * pb; } if(cc > 1) { dp[i+1][aa][bb][cc-1] += dp[i][aa][bb][cc] * pc; } dp[i+1][aa][bb][cc] += dp[i][aa][bb][cc] * P; } } } } double aa=0, bb = 0, cc=0; rep(i, a+1) { rep(j, b+1) { rep(k, c+1) { aa += (a - i) * dp[n][i][j][k]; bb += (b - j) * dp[n][i][j][k]; cc += (c - k) * dp[n][i][j][k]; } } } printf("%.10lf %.10lf %.10lf", aa, bb, cc); }