首先通过二分来确定这种最大值最小的问题。假设每个区间的和的最大值为x,那么只要判断的时候只要贪心即可。也就是如果和不超过x就一直往区间里放数,否则就开辟一个新的区间,这样来判断是否k个区间容得下这些数。还有就是输出也挺麻烦的,借鉴了一下lrj的代码,感觉也是十分巧妙。 1 #include 2 u....
分类:
其他好文 时间:
2015-04-13 06:51:42
阅读次数:
95
Getting started as a Java developer these days is quite straightforward. There are countless books on the subject, and of course an abundance of online material to study.
最近,入门成为一名java开发人员是非常简单的.有无相关的书...
分类:
编程语言 时间:
2015-04-11 13:20:03
阅读次数:
204
原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明以下出处,否则追究版权法律责任。
深蓝的blog:
为PL/SQL Developer添加“官方文档”。
简单操作:
在按照上图点击进入后,点击右侧的“setup”选项(下图是已经导入了文档的,正常books框内是为空的),如下:
在下面这里,选择文档所在的路径,点击“Build”按钮,如下:...
分类:
数据库 时间:
2015-04-10 09:35:36
阅读次数:
168
学校数据结构的课程实验之一。用到的数据结构:B-树基本功能:对虚拟书库的图书进行查看、增加、删除、修改。主函数:#include #include "Library.h"using namespace std;int main(){ Library myLib=Library("books.t...
分类:
其他好文 时间:
2015-04-09 00:47:00
阅读次数:
269
1566: The Maze Makers
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 90 Solved: 33
[Submit][Status][Web
Board]
Description
The Maze Makers is a publisher of puzzle books. One of their most ...
分类:
其他好文 时间:
2015-04-08 09:13:58
阅读次数:
135
Description
The Maze Makers is a publisher of puzzle books. One of their most popular series is maze books. They have a program that generates rectangular two-dimensional mazes like the one shown...
分类:
其他好文 时间:
2015-04-07 17:43:08
阅读次数:
156
给你m本书,每本a[i]页(0 2 #include 3 #include 4 #define MAX 505 5 using namespace std; 6 int m, k; 7 long long arr[MAX], sum, Min, ans; 8 bool vis[MAX]; 9 int...
分类:
其他好文 时间:
2015-04-05 17:28:33
阅读次数:
119
http://zh.scala-tour.com/#/welcome? Five free books on Scala http://www.oschina.net/question/103999_46884?...
分类:
其他好文 时间:
2015-04-01 11:34:53
阅读次数:
130
题目链接:点击打开链接
Book Replacement
The deadline of Prof. Hachioji’s assignment is tomorrow. To complete the task, students have to copy pages of many reference books in the library.
All the ref...
分类:
其他好文 时间:
2015-03-31 16:10:39
阅读次数:
218
这里介绍一个基础的搜索引擎技术
假如有两段文字
1,books and friends should be few but good
2,A good book is a good friend
假如我们忽略掉大小写和复数,可以整理出一张单词表,显示哪个单词再哪段文字,
英文单词
文章编号
a
2
and
1
be
1
bo...
分类:
其他好文 时间:
2015-03-29 22:17:03
阅读次数:
450