原题:UVA 1172 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3613动态规划问题。定义: dp[i] = 右岸前i个村庄(m岸)能够与左岸(n岸)...
分类:
其他好文 时间:
2014-07-07 17:13:26
阅读次数:
260
原题: UVA 1169 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3610大白书上的原题。代码:#include #include #include ...
分类:
其他好文 时间:
2014-07-07 15:09:20
阅读次数:
386
#> /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT # 开放80端口了
分类:
系统相关 时间:
2014-07-01 22:28:10
阅读次数:
355
//记录过去5秒的平均流量字节/秒NSLog(@"%llu",[ASIHTTPRequest averageBandwidthUsedPerSecond]);
分类:
其他好文 时间:
2014-07-01 21:53:11
阅读次数:
150
收集一些css的生成工具,开发中可以直接拿过来用。特别是那些css3中的一些新的特性。 1 css渐变背景在线生成工具 http://www.colorzilla.com/gradient-editor/ 2 css3圆角在线生成工具 http://border-radius.com/ 3 网格布局...
分类:
Web程序 时间:
2014-07-01 00:19:10
阅读次数:
244
题目链接:点击打开链接
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define inf 1152921504606846976
#define ll __int64
#define N 2005
ll n;
ll dp[...
分类:
其他好文 时间:
2014-06-30 19:16:06
阅读次数:
317
Description
物流公司要把一批货物从码头A运到码头B。由于货物量比较大,需要n天才能运完。货物运输过程中一般要转停好几个码头。物流公司通常会设计一条固定的运输路线,以便对整个运输过程实施严格的管理和跟踪。由于各种因素的存在,有的时候某个码头会无法装卸货物。这时候就必须修改运输路线,让货物能够按时到达目的地。但是修改路线是一件十分麻烦的事情,会带来额外的成本。因此物流公司希望能够订一...
分类:
其他好文 时间:
2014-06-30 16:50:24
阅读次数:
252
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1143
题意:逆时针给一个凸包的n(n
解法:求最短哈密顿本身是一个NP问题,但是因为是凸包上,可以利用这个做;有一个性质:凸包上的最短哈密顿路径不会出现交叉。所以可以看出来从一点出发,他要么和顺时针相邻点连接,要么和逆时针相邻点相连接;通过这个性质可以通过dp做:
ans[i][j...
分类:
其他好文 时间:
2014-06-30 06:11:07
阅读次数:
328
题目
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operations permitte...
分类:
其他好文 时间:
2014-06-30 00:46:38
阅读次数:
262
3622: 已经没有什么好害怕的了
Time Limit: 10 Sec Memory Limit: 256 MB
Submit: 7 Solved: 6
[Submit][Status]
Description
Input
Output
Sample Input
4 2
5 35 15 45
40 20 10 30
Sampl...
分类:
其他好文 时间:
2014-06-29 22:28:01
阅读次数:
325