比赛 |
NOIP2008集训模拟2 |
评测结果 |
WWWWWWWWWWEEEEEEEEEE |
题目名称 |
沙漠赛道 |
最终得分 |
0 |
用户昵称 |
rottenwood |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2008-11-11 11:12:25 |
显示代码纯文本
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
c:=c*f[i];
tp:=exp(ln(c)/n);
tp:=tp*10;
tp:=tol-tp;
e:=tzhu*win1+tdi*win2+tp*ping;
writeln(win1:0:2,' ',win2:0:2,' ',ping:0:2);
writeln(e:0:3);
close(output);
end.