Help required in an interesting geometry problem on Timus(1679. Scrooge's Tower)

Правка en1, от aditya_sheth, 2020-07-27 12:00:58

The problem asks to check if it is possible to rotate a square(of side length R*sqrt(2) in the problem) with fixed center(origin on 2-D plane) such that two points p1(x,y) and p2(x,y) lies on the border of square.

I have coded a solution using floating point operations, but it is failing on test #10.

It would be great help if anyone can help with a method using integer operations.

Теги #timus, #geometry

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский aditya_sheth 2020-07-27 12:00:58 525 Initial revision (published)