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 |
Re:关于离线方法的问题In Reply To:关于离线方法的问题 Posted by:zjkmxy at 2015-05-09 14:39:49 > 我看网上很多人把输入查询先按x再按y排序后查询这么写: > for(j=q[i-1].x;j<q[i].x;++j)delete(pretty[j]); > for(j=q[i-1].y+1;j<=q[i].y;++j)insert(pretty[j]); > x一定是删除没错,但是y为啥非得是递增的啊?如果查询是先(1,7)再(2,6),不就挂了么? > > 求大神指教,感激不尽。 题目说了区间存在包含关系。。。。。。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator