题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=1975题意:给出一个带权有向图。求一个最大的K使得前K短路的长度之和不大于给定的值Sum。思路:首先,求出每个点到n的最短路。接着,使用优先队列,节点为(D,u)。首先将(dis[1],1)...
分类:
其他好文 时间:
2014-06-23 06:43:52
阅读次数:
188
题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2879题意:有n道菜,每道菜需要b[i]份,m个厨师,第j个厨师做第i道菜需要时间a[i][j],求做完所有菜,所有人等待的最小总时间。思路:设所有的菜为sum。一个明显的思路是将每个厨师拆...
分类:
其他好文 时间:
2014-06-23 06:39:56
阅读次数:
180
题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=1003思路:m个点e条边n天。给出每条边的权值以及有些点有些天不能走。对于某连续的两天i和i+1,若两天从起点到终点选择的路径不同需要额外代价K。求最小的总代价:ans=sum(每天的代价)...
分类:
其他好文 时间:
2014-06-23 06:29:52
阅读次数:
211
题目描述Given a non-negative integer sequence A with length N, you can exchange two adjacent numbers each time. After K exchanging operations, what’s the ...
分类:
其他好文 时间:
2014-06-22 23:36:42
阅读次数:
232
npot texture: non-power-of-two texture.rectangle texture: non-square (height != wdith)在测试Samsumg Galaxy S4的时候, 发现rectangle texture支持不好, 虽然创建成功, 但是绘制有问...
分类:
移动开发 时间:
2014-06-22 23:17:17
阅读次数:
240
Minimum Path Sum:Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along...
分类:
其他好文 时间:
2014-06-22 23:06:39
阅读次数:
290
【游戏Server中Server的类别】 There are two common and proven approaches to structuring a network game which are known asAuthoritative ServerandNon-Authoritat....
分类:
Web程序 时间:
2014-06-22 23:04:07
阅读次数:
255
Batteries included: RabbitMQ clustering The clustering built in to RabbitMQ was designed with two goals in mind: allowing consumers and producers to k...
分类:
其他好文 时间:
2014-06-21 16:31:16
阅读次数:
276
Divide two integers without using multiplication, division and mod operator.Analysis: 我自己用binary search做老是出TLE的错误,看了网上思路,有了如下方法:long did = dividend, l...
分类:
其他好文 时间:
2014-06-21 16:06:48
阅读次数:
144
1. Consumers and producers Producers create messages and publish (send) them to a broker server (RabbitMQ). A message has two parts: a payload and a l...
分类:
其他好文 时间:
2014-06-21 14:33:14
阅读次数:
431