|
|
back to boardShow all messages Hide all messages0 0 0 1000 1 0 YES 0 0 1 1000 1 0 YES 0 0 1 1000 2 0 YES Real thanks, Sergey. I had WA3. When I test my program with your tests, I get wrong answer on the second test. My mistake was in comparing the angle ACB with 90 degrees. There was (in C++): if (angle==pi/2.0)... but the right text would be: if (fabs(angle-pi/2.0)<=1e-11)... When I fixed the problem I got AC. Never forget to use EPS when compare real numbers. Without it, result of the work of your program is almost unpredictable 0 0 0 1000 1 0 YES 0 0 1 1000 1 0 YES 0 0 1 1000 2 0 YES 0<=|x|,|y|<=100 But tests are useful :) Edited by author 18.05.2009 12:28If 1000 insted of 100 prevents your program from passing the tests, then your program is really horrible =) P.S. I've written 1000 instead of 100 as a very corner cases specially to test possible error instability. |
|
|