#include #define repi(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,a) repi(i,0,a) const int MAX_M = 10; int M, S[MAX_M]; double dp[MAX_M+1][1<>1; repi( k, j