|
|
вернуться в форумMy God, why do I allways have TLE#8?!?! Several programs don't pass this test. Any trick? Help. Thanks. (-) Послано Alexey 13 июл 2006 15:13 Re: My God, why do I allways have TLE#8?!?! Several programs don't pass this test. Any trick? Help. Thanks. (-) What algorithm do you use? It is necessary to take square root I use Binnary Search to find N. I see that it works slow but to find sqrt I need BS too (-) Послано Alexey 14 июл 2006 13:45 Re: I use Binnary Search to find N. I see that it works slow but to find sqrt I need BS too (-) It is possible to solve this problem using BS. So it looks like some optimization is required... Look. (+) Послано Alexey 14 июл 2006 15:14 The first program did like this: If c<0 then l:=n; If c=0 then break; If c>0 then r:=n; Where l,n,r:array...; Now I do like If c<0 then swap(no1,no2); If c=0 then break; If c>0 then swap(no2,no3); Where no1,no2,no3:byte; ANW, TLE#8 in both cases. |
|
|