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 1075. Thread in a Space

if yor have WA #9 float poin error, i'am ascape it after
Posted by Валентин 31 Mar 2009 18:43
  ac := sqrt(sqr(xa-xc) + sqr(ya-yc) + sqr(za-zc));
  bc := sqrt(sqr(xb-xc) + sqr(yb-yc) + sqr(zb-zc));
  ab := sqrt(sqr(xa-xb) + sqr(ya-yb) + sqr(za-zb));

//without this i have error
  if (ac = 0) or (bc = 0) or (ab = 0) then
    begin
    writeln(0);
    halt;
    end;
//end