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 1173. Lazy Snail

why I got WA?
Posted by qwt 13 May 2002 19:58
 var
  a:array[0..1000,1..3] of real;

  x,y,x0,y0:real;
  n,i,j,k:integer;
begin
  readln(x0,y0);
  readln(n);
  fillchar(a,sizeof(A),0);
  for i:=1 to n do begin
    readln(x,y,a[i,3]);
    x:=x-x0;y:=y-y0;
    a[i,1]:=x;a[i,2]:=y;
  end;
  for i:=1 to n-1 do for j:=i+1 to n do if a[i,1]*a[j,2]-a[i,2]*a[j,1]
>0 then begin
    a[0]:=a[i];a[i]:=a[j];a[j]:=a[0];
  end;
  writeln(0);
  for i:=1 to n do begin
    writeln(a[i,3]:0:0);
  end;
  writeln(0);
end.
help me please
Posted by qwt 14 May 2002 16:34
Re: why I got WA?
Posted by hoan 27 Nov 2010 23:57

Edited by author 27.11.2010 23:57

Edited by author 27.11.2010 23:58