摘要: 题目:http://poj.org/problem?id=3273题意:把n个数分成m份,使每份的和尽量小,输出最大的那一个的和。思路:二分枚举最大的和,时间复杂度为O(nlog(sum-max));一道很好的题。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int maxn = 100000+10; 8 int a[maxn]; 9 10 int main()11 {12 int n, m, i, Max, sum;13 while(~sc... 阅读全文
posted @ 2014-03-13 21:07 水门 阅读(193) 评论(0) 推荐(0) 编辑