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 |
POJ的评测机未免也太狠了这是我线段树单点查询的代码: int ask(int pos,int index) { if( l(index)==r(index) ) return sum(index); pushdown(index); int mid=( l(index)+r(index) )>>1; if(pos<=mid) ask(pos,index<<1); else ask(pos,index<<1|1); } 有没有发现if_else那里少了return。 结果这样的程序居然AC了? 搞得我在UVA RE了三页…… Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator