Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
能帮忙看下这段代码有问题吗In Reply To:请大牛指教 (for example in Figure 1 the ancestors of node 2 are 2 and 5)是什么意思啊? Posted by:firstacm at 2006-03-11 22:02:37 for(i=1;i<=count;i++)rmq[i][0]=i; t=1; for(j=1;j<k;j++){ for(i=1;i<=count;i++) if(d[rmq[i][j-1]]<=d[rmq[i+t][j-1]]) rmq[i][j]=rmq[i][j-1]; else rmq[i][j]=rmq[i+t][j-1]; t*=2; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator