ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1234. Bricks

whats wrong?
Posted by Alexander Sokolov [MAI] 22 Sep 2006 18:41
here is my code
please give some tests...

program brick(input,output);
var
a,b:array[1..3] of real;
c:array[1..2,1..3] of real;
i,j,k:integer;
u:integer;
t,y:boolean;
begin
for i:=1 to 3 do
read(a[i]);
for i:=1 to 2 do
read(b[i]);

for i:=1 to 2 do begin
for j:=1 to 3 do begin
c[i,j]:=b[i]-a[j];
end;
end;
for j:=1 to 3 do begin
if (c[1,j]>=0) then begin
t:=true;
u:=j;
end;
end;

for j:=1 to 3 do begin
if (c[2,j]>=0) and (u<>j) then y:=true;
end;
if t and y then begin
writeln('YES');
halt;
end;
writeln('NO');
end.