题目链接题意:给一个n个数的序列a1, a2, ..., an ,这些数的范围是0~n-1, 可以把前面m个数移动到后面去,形成新序列:a1, a2, ..., an-1, an (where m = 0 - the initial seqence)a2, a3, ..., an, a1 (wher...
分类:
其他好文 时间:
2014-08-16 21:00:01
阅读次数:
188
链接:http://poj.org/problem?id=2516
题意:有k种货物,n个客户对每种货物有一定需求量,有m个仓库,每个仓库里有一定数量的k种货物,然后k个n*m的矩阵,告诉从各个仓库到各个客户位置运送单位第k种货物所需的运费,问满足所有客户需求的最小费用,如满足不了所有客户,则输出-1。
思路:题目有点绕,不过多看看也就理解了。这道题算是最小费用最大流的入门题吧,建图很...
分类:
其他好文 时间:
2014-08-16 13:50:20
阅读次数:
306
Minimum Path SumGiven amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along ...
分类:
其他好文 时间:
2014-08-16 02:13:49
阅读次数:
189
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:
其他好文 时间:
2014-08-15 23:47:19
阅读次数:
302
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394 Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others)Memory Limi...
分类:
其他好文 时间:
2014-08-15 20:49:39
阅读次数:
227
Minimum Window SubstringGiven a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).Fo...
题意:
给出一个图片,分成N×N个单元格,有M次操作,每次操作将(x,y)的值变为以(x,y) 为中心L(L为奇数)为边长的区域内的最小值和最大值的均值(floor((maximum+minimum)/2)),并输出该值。
分析:
明显的二维线段树的单点更新和区间查询,维护最值。
更新肯定是先在二维内找到叶子节点的那棵线段树,然后再在这棵树上更新,这部分很简单,就想成一维的写。但是这毕竟是二维线段树,二维的部分也需要维护,当然这部分比较麻烦,我们先想一想一维的:一维的节点维护的是值,我们只要根据它的左右儿子...
分类:
其他好文 时间:
2014-08-15 12:58:58
阅读次数:
224
实验环境#uname-aLinuxlocalhost.localdomain3.10.0-123.el7.x86_64#1SMPMonJun3012:09:22UTC2014x86_64x86_64x86_64GNU/Linuxcat/etc/redhat-releaseCentOSLinuxrelease7.0.1406(Core)添加两块新硬盘做来实验。操作步骤创建分区先分别在两个磁盘上创建六个分区,然后查看分区#..
分类:
其他好文 时间:
2014-08-15 10:51:39
阅读次数:
303
操作分区#fdisk-l......Disk/dev/sdb:32.2GB,32212254720bytes255heads,63sectors/track,3916cylindersUnits=cylindersof16065*512=8225280bytesSectorsize(logical/physical):512bytes/512bytesI/Osize(minimum/optimal):512bytes/512bytesDiskidentifier:0x00000000Disk/dev/..
分类:
其他好文 时间:
2014-08-15 02:51:17
阅读次数:
311
操作分区:[root@localhost~]#fdisk-lDisk/dev/sdb:21.5GB,21474836480bytes255heads,63sectors/track,2610cylindersUnits=cylindersof16065*512=8225280bytesSectorsize(logical/physical):512bytes/512bytesI/Osize(minimum/optimal):512bytes/512bytesDiskidentifier:0x00000..
分类:
系统相关 时间:
2014-08-15 02:50:59
阅读次数:
316