WA#1 ! Please help, I can't understand it ??
Here is my code :
Const fi='input.txt';
fo='output.txt';
Var Range,a1,b1,a2,b2,x,y,x1,y1,x2,y2:real;
n,i,j:integer;
f,g:text;
{------------------------------------------------------------------------}
Begin
Assign(f,fi); Reset(f);
Assign(g,fo); Rewrite(g);
Readln(f,Range,x1,y1,x2,y2);
a1:=y1; a2:=y2; b1:=x1*(-1); b2:=x2*(-1);
Readln(f,n);
for i:=1 to n do
Begin
Readln(f,x,y);
if (sqrt(x*x + y*y)<=Range) then
if (x1<>x2) or (y1<>y2) then
begin
if ((x*a1+y*b1)*(x2*a1+y2*b1)>=0) and
((x*a2+y*b2)*(x1*a2+y1*b2)>=0) then
Begin
Writeln(g,'YES');
Continue;
End;
End
else if (x1=x2) and (y1=y2) then
if (x*a1+y*b1)=0 then
Begin
Writeln(g,'YES');
Continue;
ENd;
Writeln(g,'NO');
End;
Close(f);
Close(g);
End.
Re: WA#1 ! Please help, I can't understand it ??
Read FAQ! You must use standart Input/Output, not files.