Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Numbers very big -> linear time won't work. I'll remove the DP tag.
This comment is hidden because it contains spoiler information about the solution
The ray gets immediately reflected after travelling zero units. You can consider -a as the angle for h == 1 and a > 0
Strictly speaking, this is not needed...
There are more than 1000 tests.
The two hints are not mutually exclusive; there are good solutions that use them both. If you want to know how to calculate areas of triangles without using square roots, see the reply to centosette below.
The test cases don't include any huge examples, so runtime shouldn't be a problem unless your solution is very very inefficient.
Hi,
This map is expecting 0, not 1. You must have lookeed at the wrong input/output
Happy coding! 😎✌️