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 |
(RMQ)If you have pass your own date, but always WA, you should check fuction Log2().int Log1(int x) { int i; for (i=16; i>=0&&(1<<i)>=x; i--); i++; if ((1<<i)>x) i--; return i; } int Log2(int x) { int y = (int)(log((double)x)/log(2.0)); return y; } You can try the two fuctions. -_- Segment Tree is good! 1Y! RMQ, cewawawawaAC Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator