// Problem   Help Bob
// Algorithm exponential dynamic programming
// Runtime   O(m^2*2^m)
// Author    Christoph Schwirzer
// Date      2008.07.06
#include <iostream>
#include <fstream>
#include <cassert>
using namespace std;
const int M = 16;
double d[M][M], p[M], a[M], dp[1<<M];

#define in cin

int main()
{
	//ifstream in("helpbob.in");
	int m;
	while (in >> m)
	{
		if (m == 0)
			break;
		assert(0 < m && m <= 15);
		for (int i=0; i<m; i++)
			for (int j=0; j<m; j++)
				d[i][j] = 1.0;
		for (int i=0; i<m; i++)
		{
			int n;
			in >> p[i] >> a[i] >> n;
			assert(1 <= p[i] && p[i] <= 10000);
			assert(1 <= a[i] && a[i] <= 10000);
			assert(0 <= n && n < m);
			for (int j=0; j<n; j++)
			{
				int x, y;
				in >> x >> y;
				assert(0 < x && x <= m);
				assert(1 <= y && y <= 50);
				--x;
				assert(d[i][x] == 1.0);
				d[i][x] *= (100 - y) * 0.01;
			}
		}
		double res = 1e20;
		int k = 1 << m;
		for (int i=0; i<k; i++)
			dp[i] = res;
		dp[0] = 0.0;
		for (int mask=0; mask<k; mask++)
		{
			double area = 0.0;
			for (int i=0; i<m; i++)
				if (mask & (1 << i))
					area += a[i];
				else
				{
					double cost = p[i];
					for (int j=0; j<m; j++)
						if (mask & (1 << j))
							cost *= d[j][i];
					if (dp[mask] + cost < dp[mask | (1 << i)])
						dp[mask | (1 << i)] = dp[mask] + cost;
				}
			if (mask)
			{
				double tmp = dp[mask] / area;
				if (tmp < res)
					res = tmp;
			}
		}
		cout.setf(ios::fixed);
		cout.precision(4);
		cout << res << endl;
	}
	return 0;
}
