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 1207. Median on the Plane

Help me with my program?
Posted by Alexander Bovkun 3 Apr 2005 00:49
Help me to debug my program or give me some tests. Here is my code:

[code deleted]

Edited by moderator 24.11.2019 23:21
I have AC already. No help is needed.
Posted by Alexander Bovkun 3 Apr 2005 01:04
I made a mistake while working with Leftmost point. The part of program wich was not right should look like this:

LeftmostIndex:=1;
For I:=2 To N Do If P[I].X<P[LeftmostIndex].X Then LeftmostIndex:=I;

P[LeftMostIndex].Angle:=-2*Pi;
For I:=1 To N Do If I<>LeftMostIndex Then P[I].Angle:=GetAngle(P[LeftmostIndex],P[I]);
QSort(1,N);

LeftmostIndex is an integer variable.