记录编号 |
7794 |
评测结果 |
AAAAAAAAAAAAAAAAAAAA |
题目名称 |
沙漠赛道 |
最终得分 |
100 |
用户昵称 |
书剑飘零 |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.923 s |
提交时间 |
2008-11-11 19:16:56 |
内存使用 |
1.64 MiB |
显示代码纯文本
program tz;
type score=array[0..100001,1..2] of real;
var a1,a2,a3,a4,b1,b2,b3,b4:real;
dong1,dong2,i,j,k:longint;
n:longint;s,l1,l2,l3,qian,qian1,qian2:real;
pingjunshu,p1,p2,p3,p4,p5,p6:real;
a:score;
f1,f2:text;
begin
assign(f1,'mirage.in');
assign(f2,'mirage.out');
reset(f1);
rewrite(f2);
readln(f1,a1,a2,a3,a4);
readln(f1,b1,b2,b3,b4);
readln(f1,dong1,dong2);
readln(f1,n);
for i:=1 to n do
readln(f1,a[i,1],a[i,2]);
p4:=(1-a1)*(1-a2)*(1-a3)*(1-a4);
p5:=(1-b1)*(1-b2)*(1-b3)*(1-b4);
p3:=(1-p4)*(1-p5);
p6:=(dong1)/(dong1+dong2);
p1:=p4*p5*p6+p4*(1-p5);
p2:=1-p1-p3;
qian:=0;qian1:=0;qian2:=0;
for i:=1 to n do
begin
qian:=qian+a[i,1];
if a[i,2]=0 then qian1:=qian1+a[i,1];
if a[i,2]=1 then qian2:=qian2+a[i,1];
end;
l1:=qian-2*qian1;
l2:=qian-2*qian2;
pingjunshu:=1;
for i:=1 to n do
pingjunshu:=exp(ln(a[i,1])/n)*pingjunshu;
l3:=qian-pingjunshu*n;
s:=l1*p1+l2*p2+l3*p3;
write(f2,p1:0:2,' ',p2:0:2,' ',p3:0:2);
writeln(f2);
write(f2,s:0:2);
close(f1);
close(f2);
end.