题目大意: 共N ( 1 ≤ N ≤ 100,000 )个 工作日 ,分M ( 1 ≤ M ≤ N ) 个 清算月 一个 清算月 包含一个工作日或更多连续的工作日,每一个工作日都仅被包含在一个 清算月 当中. 按顺序分组,得到一个最大值最小化的月度开支(即 在 所有可能的分组结果的最大值 中得到一个最小的) Input Line 1: Two space-separated integers: N and M Lines 2..N+1: Line i+1 contains the num…
直接二分答案然后判断. ----------------------------------------------------------------------------- #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #define rep( i , n ) for( int i = 0 ; i < n ; ++i ) #define c…
/* Monthly Expense Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10757 Accepted: 4390 Description Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and re…
Monthly Expense Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17982 Accepted: 7190 Description Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recor…
Monthly Expense Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 14158 Accepted: 5697 Description Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and r…