Search found 3 matches

by Seokchan
Sun Feb 09, 2003 2:31 pm
Forum: Volume 100 (10000-10099)
Topic: 10089 - Repackaging
Replies: 41
Views: 19300

10089

My algorithm tests all pair of packages, but it is too slow (I got TL)
I can`t think better algorithm.

help plz.
by Seokchan
Thu Feb 06, 2003 4:29 pm
Forum: Volume 104 (10400-10499)
Topic: 10439 - Temple of Dune
Replies: 15
Views: 7141

Thank you :D

I got AC.



I wonder my algorithm has some precision problem, but I don`t know how to avoid that problem.

In my accepted solution, i have used the following function to check if a is a multiple of b :


[cpp]
inline bool IsAMultipleOf( double num, double div )
{
const double l ...
by Seokchan
Thu Feb 06, 2003 3:46 pm
Forum: Volume 104 (10400-10499)
Topic: 10439 - Temple of Dune
Replies: 15
Views: 7141

I think my algorithm for this problem is simple and there is no exceptional cases, but I failed to got AC.


My algorithm is :

1. find angles.
2. check whether angles are multiple of (2*Pi/n) (n = 3~200)
(I thought a is multiple of b, if ((a/b) - floor(a/b) < epsilon). )


I wonder my algorithm ...

Go to advanced search