【题目链接】 http://www.lydsy.com/JudgeOnline/problem.php?id=2726 【题意】 将n个任务划分成若干个块,每一组Mi任务花费代价(T+sigma{ tj }+s)*sima{ fi },j属于Mi,T为当前时间,问最小代价。 【思路】 设f[i]为将 ...
分类:
其他好文 时间:
2016-04-07 08:20:26
阅读次数:
301
创建表:hive> CREATE TABLE pokes (foo INT, bar STRING); Creates a table called pokes with two columns, the first being an integer and the other a string创建 ...
分类:
其他好文 时间:
2016-04-07 08:21:16
阅读次数:
197
https://www.douban.com/note/277033391/ 進入到日本Amazon看到某些商品有預覽圖可以放大欣賞,當你想要右鍵下載卻發現只得到空白圖或白邊圖、縮圖、切割圖,究竟原圖在哪裡?其實Amazon大圖並不是把切割後的圖拼貼起來,而是拿原圖下去做分析,接著來看看Amazon ...
分类:
其他好文 时间:
2016-04-07 08:21:33
阅读次数:
247
服务的注册与提供 在采用了依赖注入的应用中,我们总是直接利用DI容器直接获取所需的服务实例,换句话说,DI容器起到了一个服务提供者的角色,它能够根据我们提供的服务描述信息提供一个可用的服务对象。ASP.NET Core中的DI容器体现为一个实现了IServiceProvider接口的对象。 一、Se ...
分类:
其他好文 时间:
2016-04-07 08:20:16
阅读次数:
232
坚持~坚持~坚持~! 视频地址:http://v.qq.com/page/z/7/n/z0191ojuc7n.html ...
分类:
其他好文 时间:
2016-04-07 08:21:09
阅读次数:
169
查找了msdn上关于bool的介绍,整理如下: bool 关键字是 System.Boolean 的别名。它用于声明变量来存储布尔值 true 和 false。 如果需要一个也可以有 null 值的布尔型变量,请使用 bool?。 bool 变量的默认值为 false。bool? 变量的默认值为 n ...
分类:
其他好文 时间:
2016-04-07 08:20:45
阅读次数:
152
Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes ...
分类:
其他好文 时间:
2016-04-07 08:20:37
阅读次数:
124
FluentData微型ORM 最近在帮朋友做一个简单管理系统,因为笔者够懒,但是使用过的NHibernate用来做这中项目又太不实际了,索性百度了微型ORM,FluentData是第一个跳入我眼睛的词。简单的了解下FluentData使用,主要看看是不是符合笔者的要求。嗯……嗯……反应还不错,AP ...
分类:
其他好文 时间:
2016-04-07 08:19:37
阅读次数:
462
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O''s into 'X''s in that surround ...
分类:
其他好文 时间:
2016-04-07 08:20:05
阅读次数:
133
求最小值最大显然是要二分 二分之后转换成了判定性问题 我们考虑哪些点一定不能选 显然是将所有可选点选中之后依然不满足条件的点不能选 那么我们不妨维护一个堆,每次取出堆顶看看是否满足条件 不满足条件就pop掉,并进行松弛 最后判定堆是否为空即可 另外,其实这道题思考到这里我们会发现二分并没有什么卵用, ...
分类:
其他好文 时间:
2016-04-07 08:17:26
阅读次数:
200
There is a fence with n posts, each post can be painted with one of the kcolors.You have to paint all the posts such that no more than two adjacent fe ...
分类:
其他好文 时间:
2016-04-07 08:17:43
阅读次数:
110
// **Day6 // **Functiion //func SayHello (value: String, value1:String)->String { // // let str = value + "" + value1 // // print("str \(value)") // r ...
分类:
其他好文 时间:
2016-04-07 08:17:22
阅读次数:
99
Given a linked list and two values v1 and v2. Swap the two nodes in the linked list with values v1 and v2. It's guaranteed there is no duplicate value ...
分类:
其他好文 时间:
2016-04-07 08:17:16
阅读次数:
120
ListView控件——OK 研究官方样例 RecyclerView,在MainActivity主窗口中添加RecyclerView显示推荐的衣服照片——OK MainActivity主窗口右上角添加Menu菜单,跳转到添加衣服AddClothesActivity——OK 1.适配器 Adapter ...
分类:
其他好文 时间:
2016-04-07 08:16:33
阅读次数:
169
15.5 What is denormalization? Explain the pros and cons. 逆规范化Denormalization是一种通过添加冗余数据的数据库优化技术,可以帮助我们减少关系数据库中耗时的交Join。在一般的规范化的数据库中,我们将数据存在不同的表中是为了减少冗 ...
分类:
其他好文 时间:
2016-04-07 08:16:01
阅读次数:
151
安装和部署Hadoop 一、安装虚拟机 1、 服务器配置信息 Linux主机一 Linux主机二 Linux主机三 主机名:master 主机名:host1 主机名:host2 IP:192.168.100.100 IP:192.168.100.101 IP:192.168.100.100 HDFS ...
分类:
其他好文 时间:
2016-04-07 08:18:57
阅读次数:
239
递归与回溯
1. 递归在程序设计中也常用于需要回溯算法的场合
2. 回溯算法的基本思想:(穷举搜索算法)
1> 从问题的某一种状态出发,搜索可以到达的所有状态
2> 当某个状态到达后,可向前回退,并继续搜索其它可达状态
3> 当所有状态都达到后,回溯算法结束
3. 程序设计中可利用函数活动对象保存回溯算法的状态数据,因此可以利用递归完成回溯算法
4. 回溯算法是递归应用的重要场合,同时利用函数调用的活动对象可以保存回溯算法中重要的变量信息,递归是回溯...
分类:
其他好文 时间:
2016-04-07 07:14:28
阅读次数:
355