|
|
вернуться в форумHelp!!! TL12 [code deleted] Edited by moderator 10.08.2006 10:07 Re: Help!!! TL12 for(i=0;i<l-1;i++) for(j=i+1;j<l;j++) { if(Max>l-j)break; z=b[j].x-b[i].x; M[0]=b[i].pos; M[1]=b[j].pos; l1=2; xb=b[j].x+z; for(k=j+1;k<l;k++) { if(Max>l-k+l1)break; bs=BSearch(xb,k); ... Maybe it is O(N^3*logN)? PS: Even if it's O(N^2*logN) it won't pass TL, only O(N^2) can do it. Re: Help!!! TL12 Any hints ? Edited by author 09.08.2006 21:48 Re: Help!!! TL12 To Burunduk1: You are wrong. During the contest my O(N^2*logN) solution got accepted (with 0.25 sec). Magic "i++ -> ++i" and "inline" saved me. :) Re: Help!!! TL12 Shaman :) I think this problem is brilliant. BTW my solution for Timus-1395 solves this one within 0.015 sec. :) (-) Edited by author 10.08.2006 10:09 |
|
|