Az alábbi letöltési lehetőségek közül választhatsz: (
segítség)
Típus: text/plain
Tartalmaz szöveget
Karakterkódolás: us-ascii
Méret: 1 KB
program box(input, output);
var i, n : integer;
a, b, c, d, c2, d2 : real;
procedure Yes;
begin
writeln('Escape is possible.');
end;
procedure No;
begin
writeln('Box cannot be dropped.');
end;
begin
read(n);
for i := 1 to n do
begin
read(a, b, c, d);
if b > a then
begin
c2 := a;
a := b;
b := c2
end;
if d > c then
begin
c2 := c;
c := d;
d := c2
end;
if a > c then
if b > d then
Yes
else
No
else if d >= b then
No
else
begin
c2 := c*c;
d2 := d*d;
if (b*(c2+d2)-(c2-d2)*sqrt(c2+d2-a*a))/(2*c*d) > a then
begin
Yes
end
else
No
end;
end;
end.