Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

关于离线方法的问题

Posted by zjkmxy at 2015-05-09 14:39:49 on Problem 2761
我看网上很多人把输入查询先按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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator