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 1341. Device

Test 15, something strange
Posted by diver_ru (Fishburg SAAT) 19 Sep 2007 01:28
I send program with such procedure:

void moveNorth(double dist)
{
  w += dist / rEarth * 180 / pi;
  if (w > 91.0)
    n = (n - n) / n;
}

And got crash 15, but when i send

void moveNorth(double dist)
{
  w += dist / rEarth * 180 / pi;
}

i got accepted.

So, i think device can reach north pole with test 15 input data, but it's impossible.
Re: Test 15, something strange
Posted by bsu.mmf.team 3 Mar 2011 23:15
In this test the device flies too close to north pole.
I got AC instead WA#15 when I changed PI from 3.14159265 to 3.141592653589.
And I searched for a numerical mistake for 1 hour :) Ha-ha!

Edited by author 03.03.2011 23:16