|
|
back to boardShow all messages Hide all messagesWhat algorithm do you use? It is necessary to take square root It is possible to solve this problem using BS. So it looks like some optimization is required... Look. (+) exwRabbits_AlMag(VNTU) 14 Jul 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. |
|
|