|  | 
|  | 
| back to board | What 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... 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.
 | 
 | 
|