|
|
вернуться в форумWhat is the maximum number of divisions needed? Послано Lomir 3 июл 2007 18:02 What is the maximum number of divisions needed to get the full period? I got TLE this O(n^2) algo there n is the number of divisions. Re: What is the maximum number of divisions needed? Послано Lomir 3 июл 2007 18:15 O(n*lg n) from number of divisions also TLE. But why...? Re: What is the maximum number of divisions needed? Послано Lomir 3 июл 2007 18:26 O(n) AC in 0.234 O(n^2) memorization of prev remainders in vector with linear search O(n*lg n) memorization of prev remainders in set O(n) just used bitset<10000> cause all remainders is less then 10000 But why O(n*lg n) TLE!?!?!? |
|
|