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
北京大学《ACM/ICPC大学生程序设计竞赛训练》暑期课面向全球招生!

竟然1a了,不容易 说下思路

Posted by bsblcc at 2015-12-24 15:56:14 on Problem 1990
按阀值降序枚举cow i,那么这个cow要和现存的所有cows交流,倍数就是他的阀值,只要知道他和其他cows的距离就行了,距离分为两部分求(因为有正负),用两个树状数组,一个维护这个点左侧有多少个cows,一个维护这个点左侧所有现存cows的坐标和(右侧的信息可以计算出来);每次枚举之前先要把这个cow对应的信息删去

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