FJ对以后的每一天会花mi块钱,他想把这些天分成M个时段,然后每个时段的花费和最小。 二分答案,如果加上这天还没有达到mid,就加上它。之后看分成的时段是否大于M #include <cstdio> #include <algorithm> using namespace std; int n,m,
分类:
其他好文 时间:
2016-01-31 21:46:14
阅读次数:
173
http://mysql.taobao.org/monthly/2015/08/07//*****************************************************************//**Creates and opens a handle to a table...
分类:
其他好文 时间:
2015-12-23 21:06:07
阅读次数:
221
Monthly Expense 题目大意:不废话,最小化最大值 还是直接套模板,不过这次要注意,是最小化最大值,而不是最大化最小值,判断的时候要注意 联动3258 1 #include 2 #include 3 #include 4...
分类:
其他好文 时间:
2015-12-22 01:16:40
阅读次数:
182
题意:经典的最大值最小问题……给FJ在n天里每天花的钱数,问如果将n天分成m组,每组内的天数连续,最少每组给多少钱可以让每组的钱够花。解法:二分。现在看来是个挺简单的二分……然而我二分一向都是理论AC……写出来跟屎一样……QAQ……贴个代码当模板好了……代码:#include#include#inc...
分类:
其他好文 时间:
2015-11-09 20:55:53
阅读次数:
215
MarketTime Limit:2 Seconds Memory Limit:65536 KBThere's a fruit market in Byteland. The salesmen there only sell apples.There arensalesmen in the frui...
分类:
其他好文 时间:
2015-10-16 20:46:43
阅读次数:
301
Number GameTime Limit:2 Seconds Memory Limit:65536 KBThe bored Bob is playing a number game. In the beginning, there arennumbers. For each turn, Bob w...
分类:
其他好文 时间:
2015-10-16 20:40:10
阅读次数:
264
Prime QueryTime Limit:1 Second Memory Limit:196608 KBYou are given a simple task. Given a sequenceA[i]withNnumbers. You have to perform Q operations o...
分类:
其他好文 时间:
2015-10-16 20:26:22
阅读次数:
315
crond服务通常被放在/etc/init.d/crond , 这样就可以在系统启动后自动启动crond服务。linux中的用户使用crontab命令来配置cron任务.crontab在/etc目录下面存在cron.d,cron.daily,cron.weekly,cron.monthly,cron...
分类:
系统相关 时间:
2015-10-16 18:48:59
阅读次数:
281
CakeTime Limit:4 Seconds Memory Limit:65536 KBAlice and Bob like eating cake very much. One day, Alice and Bob went to a bakery and bought many cakes....
分类:
其他好文 时间:
2015-10-15 23:24:37
阅读次数:
264
ZOJ 3406Another Very Easy Task#include #include const int N = 100005;char s[N];int main() { bool f = 0; int size = 0; char ch; while(scanf("%c", &ch)!...
分类:
其他好文 时间:
2015-10-14 09:04:24
阅读次数:
174