状压整张图包括每个点的炸弹有没有被拿,墙壁有没有被炸,随意剪枝。用优先队列存一下状态。还有就是注意浮点数溢出的问题。#include #include #include #include #include #include #include #include #include #include #i...
分类:
其他好文 时间:
2014-08-27 17:55:18
阅读次数:
184
思想: 常量空间要求,决定了不能使用递归。满二叉树,简单循环,每次修改一层即可。
思想同上: 但是下一层最开始结点和连接过程中链表的第一个结点不易确定,所以需要设定两个变量来保存。
分类:
其他好文 时间:
2014-08-27 16:26:58
阅读次数:
197
注意: 限制条件: 先买后卖(不同天)。
思想: 买了后,1. 若以后价格不变,不买不卖。 1. 更价格低,重新买。2. 价格升高,假定抛售,更新一下利润值。
思想:求出所有非递减序列两端绝对值之和。我贴在 leedcode 的代码和证明:
思想:动态规划。 记录下从各位置(含)开始之前...
分类:
其他好文 时间:
2014-08-27 16:00:18
阅读次数:
213
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm...
分类:
其他好文 时间:
2014-08-27 01:37:16
阅读次数:
242
题目:Reverse Linked List IIReverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,ret...
分类:
其他好文 时间:
2014-08-26 13:35:46
阅读次数:
223
nios 使用地址中31bit来表示访问是否bypass cache。如果bit 31=0 表示不bypass cache,即使用cache里的数据;如果bit 31=1表示bypass cache,即直接使用mem中的数据。如alt_remap_uncached函数 1 #ifdef NIOS2_...
分类:
移动开发 时间:
2014-08-26 00:12:15
阅读次数:
526
The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence ...
分类:
其他好文 时间:
2014-08-25 22:49:25
阅读次数:
274
Quartus 12的TimeQuest Timing Analyzer1.在Quartus II软件打开和设置设计 安装路径下\qdesigns\fir_fliter文件。在Processing 菜单上,指向Start,点击Start Analysis &Synthesis。2.运行TimeQue...
分类:
其他好文 时间:
2014-08-25 13:16:34
阅读次数:
471