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-07-09 23:00:38
阅读次数:
208
vi初接触它有三种模式: 一 一般模式 二 编辑模式 三 命令行模式介绍几种比较常用的吧 ~~ 退出:q 写入:w 强制:! (以上可叠加) 显示行号:set nu 取消:set nonu 跳转到n行:nG 最后一行:G 第一行:gg(=1G) 向某个方向移动n个字符: ...
分类:
其他好文 时间:
2014-07-09 22:07:13
阅读次数:
310
Minimum Inversion Number
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9864 Accepted Submission(s): 6069
Problem Description
T...
分类:
其他好文 时间:
2014-07-08 19:15:43
阅读次数:
232
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394...
分类:
其他好文 时间:
2014-07-08 16:27:04
阅读次数:
138
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2014-07-06 19:31:04
阅读次数:
181
Minimum Sum
Time Limit: 16000/8000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2667 Accepted Submission(s): 609
Problem Description
You are given ...
分类:
其他好文 时间:
2014-07-06 12:26:41
阅读次数:
200
Description
Consider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root node is X, we can get the minimum number in this ...
分类:
其他好文 时间:
2014-07-06 11:36:14
阅读次数:
284
题目连接:uva 10560 - Minimum Weight
题目大意:给出n,问说至少需要多少个不同重量的砝码才能称量1~n德重量,给出所选的砝码重量,并且给出k,表示有k个重量需要用上述所选的砝码测量。
解题思路:重量为1的砝码肯定要选,它可以表示到1的重量,那么下一个砝码的重量肯定选择3(2?1+1),这样1,3分别可以用一个砝码表示,而2,4分别为3-1和3+1,这样1~4的...
分类:
其他好文 时间:
2014-07-06 00:52:07
阅读次数:
174
Longest Ordered Subsequence
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 31680
Accepted: 13848
Description
A nu...
分类:
其他好文 时间:
2014-07-06 00:04:50
阅读次数:
236
本题就是使用Floyd算法求所有路径的最短路径,并且需要保存路径,而且更进一步需要按照字典顺序输出结果。
还是有一定难度的。
Floyd有一种很巧妙的记录数据的方法,大多都是使用这个方法记录数据的。
不过其实本题数据不是很大,一般太大的数据也无法使用Floyd,因为效率是O(N^3)。
所以其实也可以使用一般的Floyd算法,然后增加个三维数组记录数据。下面就是这种做法,0ms过了...
分类:
其他好文 时间:
2014-07-04 07:18:33
阅读次数:
193