Блог пользователя 3905

Автор 3905, история, 9 лет назад, По-английски

Hello my submission here gives WA on test 3 due to precision issues.My question is how to detect playing with doubles would give a WA.Because there are many instances I recall where intended solution was to manipulate with doubles but still there was no precision errors unlike this case.So if someone can help me it would be great.And yeah in above solution I am trying to find all the coordinates first (0,0) & (a1,0) being the first two and then remaining coordinates and then using the standard way of finding area of triangle if coordinates are given.

  • Проголосовать: нравится
  • -4
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by 3905 (previous revision, new revision, compare).

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
    coord[5][1] = coord[4][1] - Math.sin(rad);

I think you meant:

    coord[5][1] = coord[4][1] - a5 * Math.sin(rad);