记录编号 |
7730 |
评测结果 |
AAAAAAAAAAAAAAAAAAAA |
题目名称 |
沙漠赛道 |
最终得分 |
100 |
用户昵称 |
rottenwood |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.876 s |
提交时间 |
2008-11-11 14:39:10 |
内存使用 |
1.63 MiB |
显示代码纯文本
program mirage;
type
shuzu=array[0..4,1..2]of real;
shuzu1=array[1..100000] of real;
var
s:shuzu;
f,z:shuzu1;
i,j,k,n:longint;
c:real;
temp,zhu1,zhu2,di1,di2,ping,e,tzhu,tdi,tp,dong1,dong2,win1,win2,tol:real;
begin
assign(input,'mirage.in');reset(input);
assign(output,'mirage.out');rewrite(output);
for i:=1 to 4 do
read(s[i,1]);
readln;
for i:=1 to 4 do
read(s[i,2]);
readln(s[0,1],s[0,2]);
readln(n);
for i:=1 to n do
readln(f[i],z[i]);
temp:=1;
for j:=1 to 4 do
begin
temp:=(1-s[j,1])*temp;
end;
zhu1:=temp;
temp:=1;
for j:=1 to 4 do
temp:=(1-s[j,2])*temp;
di1:=temp;
dong1:=s[0,1]/(s[0,1]+s[0,2]);
dong2:=1-dong1;
zhu2:=1-zhu1;
di2:=1-di1;
ping:=di2*zhu2;
win1:=zhu1*di2+zhu1*di1*dong1;
win2:=zhu1*di1*dong2+di1*zhu2;
tol:=0;
for i:=1 to n do
tol:=tol+f[i];
for i:=1 to n do
begin
if z[i]=0 then
tzhu:=tzhu+f[i];
if z[i]=1 then
tdi:=tdi+f[i];
end;
tzhu:=tzhu*2;
tdi:=tdi*2;
tzhu:=tol-tzhu;
tdi:=tol-tdi;
c:=1;
for i:=1 to n do
begin
tp:=exp(ln(f[i])/n);
c:=c*tp;
end;
c:=c*n;
c:=tol-c;
e:=tzhu*win1+tdi*win2+c*ping;
writeln(win1:0:2,' ',win2:0:2,' ',ping:0:2);
writeln(e:0:2);
close(output);
end.