Pagini recente » Cod sursa (job #1904510) | Cod sursa (job #748262) | Cod sursa (job #2943688) | Cod sursa (job #2505777) | Cod sursa (job #277887)
Cod sursa(job #277887)
var c,t:array[0..30000] of longint;
max,s:real;
i,j,n,l,u:integer;
begin
assign(input,'secv3.in'); reset(input);
assign(output,'secv3.out'); rewrite(output);
readln(n,l,u);
read(c[1]);
for i:=2 to n do begin read(c[i]); c[i]:=c[i]+c[i-1];end;
readln;
read(t[1]);
for i:=2 to n do begin read(t[i]); t[i]:=t[i]+t[i-1]; end;
c[0]:=0;
t[0]:=0;
max:=0;
for i:=1 to n+1-l do
for j:=i+l-1 to i+u-1 do
begin
s:=(c[j]-c[i-1])/(t[j]-t[i-1]);
if s>max then max:=s;
end;
writeln(max:10:2);
close(input);
close(output);
end.