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 DMKaplony at 2010-06-09 13:24:18 on Problem 1083
s和t分开来存,分别排序后用2个指针从头到尾指一下,看做多的左括号为多少就可以了。
真的好多trick,
可能s>t,记得要(++t)>>1,如果某时刻所指的s和t相同,一定先做s,然后更新后再做t。。

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