#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


struct Info{
	void set(double arg_rock,double arg_paper,double arg_scissors){
		rock = arg_rock;
		paper = arg_paper;
		scissors = arg_scissors;
	}
	int rating;
	double rock,paper,scissors;
};



int POW[14];
int N,my_rating;
double* dp;
Info info[14];

double recursive(int state){

	if(dp[state] != -1.0)return dp[state];
	if(state == POW[N]-1)return 1.0;

	double ret_rock = 0,ret_paper = 0,ret_scissors = 0;
	int maximum,alive_num,new_loser;
	double calc_1,calc_2,win_rock,win_paper,win_scissors;
	double end_rock,end_paper,end_scissors,finish_rock,finish_paper,finish_scissors;
	vector<int> member;

	member.clear();
	maximum = my_rating;
	alive_num = 0;

	for(int loop = 0; loop < N; loop++){
		if(state & (1 << loop)){
			//Do nothing
		}else{
			member.push_back(loop);
			maximum = max(maximum,info[loop].rating);
			alive_num++;
		}
	}

	finish_rock = finish_paper = finish_scissors = 0.0;

	if(maximum == my_rating){

		end_rock = 0;

		calc_1 = 1.0;
		calc_2 = 1.0;

		for(int i = 0; i < alive_num; i++){
			calc_1 *= (info[member[i]].rock+info[member[i]].scissors);
			calc_2 *= info[member[i]].rock;
		}
		end_rock += calc_1-calc_2;

		calc_1 = 1.0;
		calc_2 = 1.0;

		for(int i = 0; i < alive_num; i++){
			calc_1 *= (info[member[i]].paper+info[member[i]].rock);
			calc_2 *= info[member[i]].rock;
		}
		end_rock += calc_1-calc_2;
		finish_rock = 1.0-end_rock;

		end_scissors = 0.0;

		calc_1 = 1.0;
		calc_2 = 1.0;

		for(int i = 0; i < alive_num; i++){
			calc_1 *= (info[member[i]].scissors+info[member[i]].paper);
			calc_2 *= info[member[i]].scissors;
		}
		end_scissors += calc_1-calc_2;

		calc_1 = 1.0;
		calc_2 = 1.0;

		for(int i = 0; i < alive_num; i++){
			calc_1 *= (info[member[i]].rock+info[member[i]].scissors);
			calc_2 *= info[member[i]].scissors;
		}
		end_scissors += calc_1-calc_2;
		finish_scissors = 1.0-end_scissors;

		end_paper = 0.0;

		calc_1 = 1.0;
		calc_2 = 1.0;

		for(int i = 0; i < alive_num; i++){
			calc_1 *= (info[member[i]].paper+info[member[i]].rock);
			calc_2 *= info[member[i]].paper;
		}
		end_paper += calc_1-calc_2;

		calc_1 = 1.0;
		calc_2 = 1.0;

		for(int i = 0; i < alive_num; i++){
			calc_1 *= (info[member[i]].scissors+info[member[i]].paper);
			calc_2 *= info[member[i]].paper;
		}
		end_paper += calc_1-calc_2;
		finish_paper = 1.0-end_paper;
	}

	for(int i = 0; i < POW[alive_num]; i++){

		new_loser = 0;
		win_rock = 1.0;
		win_paper = 1.0;
		win_scissors = 1.0;

		for(int loop = 0; loop < alive_num; loop++){
			if(i & (1 << loop)){
				win_rock *= info[member[loop]].rock;
				win_paper *= info[member[loop]].paper;
				win_scissors *= info[member[loop]].scissors;
			}else{
				win_rock *= info[member[loop]].scissors;
				win_paper *= info[member[loop]].rock;
				win_scissors *= info[member[loop]].paper;
				new_loser += POW[member[loop]];
			}
		}
		if(new_loser == 0)continue;

		if(state+new_loser == POW[N]-1){
			finish_rock += win_rock;
			finish_paper += win_paper;
			finish_scissors += win_scissors;
			continue;
		}

		ret_rock += win_rock*recursive(state+new_loser);
		ret_paper += win_paper*recursive(state+new_loser);
		ret_scissors += win_scissors*recursive(state+new_loser);
	}

	return dp[state] = max(ret_rock+finish_rock,max(ret_paper+finish_paper,ret_scissors+finish_scissors));
}


int main(){

	for(int i = 0; i < 14; i++)POW[i] = pow(2,i);

	scanf("%d",&N);
	N -= 1;

	scanf("%d",&my_rating);

	double r,p,s;
	for(int i = 0; i < N; i++){
		scanf("%d %lf %lf %lf",&info[i].rating,&r,&p,&s);
		info[i].set(r/100.0,p/100.0,s/100.0);
	}

	dp = new double[POW[N]];
	for(int i = 0; i < POW[N]; i++)dp[i] = -1.0;

	printf("%.10lf\n",recursive(0));
	return 0;
}

Measured memory_bytes: 3484