|
|
back to boardWhy wrong answer 3??????? WHY? Y? This is my program in Pascal: [code deleted] Edited by moderator 06.07.2006 15:01 Re: Why wrong answer 3??????? WHY? Y? here it's test 3 (I don't know what is that last 0, but so it is. It should not matter): 16 15 15 16 17 17 19 18 21 19 23 75 19 16 62 13 69 10 76 7 83 4 90 1 97 -2 104 -5 111 -8 118 -11 125 The answer is: 10 (last 10 points of the input) Re: Why wrong answer 3??????? WHY? Y? What points are coliniar? Re: Why wrong answer 3??????? WHY? Y? The points called coliniar if they lie on one line. For example (1,1) (2,2) (3,3) are coliniar. Edited by author 11.04.2005 02:22 Re: Why wrong answer 3??????? WHY? Y? try this: if you have: ------------ r:= y - k*x -n; if (result = 0) then on_line:= true else on_line := false; change it with: ------------ r := abs(y - k*x -n); if (result < 0.0000000001) then on_line:= true else on_line := false; |
|
|