SOSUSOSU

假装这是一个正经的页面

[spojAGGRCOW]Aggressive cows裸二分

https://www.spoj.com/problems/AGGRCOW/
题面
Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000). His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once put into a stall. To prevent the cows from hurting each other, FJ wants to assign the cows to the stalls, such that the minimum distance between any two of them is as large as possible. What is the largest minimum distance? 翻译(百度) 农夫约翰建了一个新的长谷仓,有N个(2个<=N<=100000个)货摊。在X1,…,Xn(0<=Xi=1000000000)的位置上,所述摊位沿直线排列。 他的C(2<=C<=N)奶牛不喜欢这种谷仓布局,一旦被放进一个小摊,它们就会互相攻击。为了防止奶牛互相伤害,FJ希望将奶牛分配到畜栏,这样它们之间的最小距离就尽可能大。最大最小距离是多少? 二分结束

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注