// hdu2430 Beans 单调队列
//
// 题目意思:
// 求一个sum%p<=k的max(sum/p)
//
// 结题报告:
// 技巧,先求出前缀和,并记录前i项对p取余的值记为x,并记下位置pos
// 按照先按x从小到大,如果x相同按pos从小到大排序。这样,问题就转换为
// 求一个最小的pos使得pos到i的值最大。
//
//...
分类:
其他好文 时间:
2015-07-25 18:26:18
阅读次数:
126
Mr. Pote's shop sells beans now. He has N bags of beans in his warehouse, and he has numbered them with 1, 2, …, N according to their expired dates. The i-th bag contains Wi units of beans. For sellin...
分类:
其他好文 时间:
2014-05-09 22:41:06
阅读次数:
503