1 #include<iostream>
2 #include<cstdio>
3 #include<cstring>
4 #include<cmath>
5 #include<map>
6 #include<algorithm>
7 #define lli long long int
8 using namespace std;
9 const int MAXN=88000;
10 inline void read(int &n)
11 {
12 char c=getchar();n=0;bool flag=0;
13 while(c<'0'||c>'9') c=='-'?flag=1,c=getchar():c=getchar();
14 while(c>='0'&&c<='9') n=n*10+c-48,c=getchar();flag==1?n=-n:n=n;
15 }
16 struct node
17 {
18 int p,v;
19 }box[MAXN];
20 double ans[MAXN];
21 int n,m;
22 int base;// 中间节点
23 struct ANS1
24 {
25 int zuanshi;
26 int qian;
27 double gailv;
28 }ans1[MAXN];
29 int ans1tot=0;
30 struct ANS2
31 {
32 int zuanshi;
33 int qian;
34 double gailv;
35 }ans2[MAXN];
36 int ans2tot=0;
37 void dfs(int num,double gl,int money,int zs)
38 {
39 if(num==base)
40 {
41 ans1[++ans1tot].qian=money;
42 ans1[ans1tot].zuanshi=zs;
43 ans1[ans1tot].gailv=gl;
44 return ;
45 }
46 dfs(num+1,(double)gl*((double)box[num+1].p/100),money+box[num+1].v,zs);
47 dfs(num+1,(double)gl*(double)( 1 - ( (double) box[num+1].p/100) ),money,zs+1);
48 }
49 void dfs2(int num,double gl,int money,int zs)
50 {
51 if(num==n)
52 {
53 ans2[++ans2tot].qian=money;
54 ans2[ans2tot].zuanshi=zs;
55 ans2[ans2tot].gailv=gl;
56 return ;
57 }
58 dfs2(num+1,(double)gl*((double)box[num+1].p/100),money+box[num+1].v,zs);
59 dfs2(num+1,(double)gl*(double)( 1 - ( (double) box[num+1].p/100) ),money,zs+1);
60 }
61 int comp1(const ANS1 &a,const ANS1 &b)
62 {
63 return a.qian<b.qian;
64 }
65 int comp2(const ANS2 &a,const ANS2 &b)
66 {
67 return a.qian>b.qian;
68 }
69 int main()
70 {
71
72 read(n);read(m);
73 base=n/2;
74 for(int i=1;i<=n;i++)
75 {
76 read(box[i].v);
77 read(box[i].p);
78 }
79 dfs(1,(double)box[1].p/100,box[1].v,0);// 钱
80 dfs(1,(double)1-(double)box[1].p/100,0,1);// 钻石
81
82 dfs2(base+1,(double)box[base+1].p/100,box[base+1].v,0);// 钱
83 dfs2(base+1,(double)1-(double)box[base+1].p/100,0,1);// 钻石
84
85 sort(ans1+1,ans1+ans1tot,comp1);
86 sort(ans2+1,ans2+ans2tot,comp2);
87 for(int i=1;i<=ans1tot;i++)
88 {
89 for(int j=1;j<=ans2tot;j++)
90 {
91 if(ans1[i].qian+ans2[j].qian>=m)
92 ans[ans1[i].zuanshi+ans2[j].zuanshi]+=ans1[i].gailv*ans2[j].gailv;
93 else break;
94 }
95 }
96 for(int i=0;i<=n;i++)
97 printf("%.3lf\n",ans[i]);
98 return 0;
99 }