typedef long long ll; typedef long double ld; #include using namespace std; #define int long long signed main(){ ll n,m; std::cin >> n>>m; vector a(n),b(n),p(n); for (int i = 0; i < n; i++) { std::cin >> a[i]>>b[i]>>p[i]; } map,ld> memo; function dfs = [&](ll i, ll j){ if(memo.find({i,j})!=memo.end())return memo[{i,j}]; if(i==n)return (ld)0; if(j==0)return memo[{i,j}]=dfs(i+1, j)+1/a[i]; return memo[{i,j}]=max(dfs(i+1, j)+1/a[i], (1/p[i])*(dfs(i+1, j)+1/b[i])+(1-1/p[i])*dfs(i,j-1)); }; std::cout << setprecision(20)<