题意:求回收所有垃圾的最短路
思路:先BFS处理两个垃圾的距离,然后DFS记忆化搜索
dp[i][state]表示处理到第i个后状态是state的最短路
#include
#include
#include
#include
#include
#include
using namespace std;
const int MAXN = 30;
const in...
分类:
其他好文 时间:
2014-06-19 12:55:30
阅读次数:
412
题目
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,...
分类:
其他好文 时间:
2014-06-19 12:08:20
阅读次数:
270
Notepad++是windows下的一个强大的文本编辑器;
它免费,开源,
比windows自带的记事本强大百倍; 我自己的感觉:
1.打开超大的文本文件,比如100M大小的文本格式的数据,记事本会罢工,Notepad++毫无压力;
2.支持种类繁多的代码的scheme, 比某些收费软件支持的还好, 比如EditPad pro居然不支持matlab/octave脚本的;
3.编辑方面,...
分类:
其他好文 时间:
2014-06-19 11:08:45
阅读次数:
282
测试成功,完美解决。
只需修改VIM目录下面的这个文件_vimrc。
加油吧,骚年。很强大的!
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
set fileencoding=chinese
else
set fileencoding=utf-8
endif
"解决菜单乱码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解决cons...
In recent years,mobile platform become more and more popular!At present,the flourishing mobile platform are iOS and Android,symbian has been declining,wp7 struggling!
Note that Android is an open,not...
分类:
移动开发 时间:
2014-06-16 12:26:35
阅读次数:
288
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the...
分类:
其他好文 时间:
2014-06-15 19:28:54
阅读次数:
246
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2014-06-15 19:26:23
阅读次数:
207
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that
adding up all the values along the path equals the given sum.
For example:
Given the below bin...
分类:
其他好文 时间:
2014-06-15 09:34:35
阅读次数:
226
nested exception is
java.lang.IncompatibleClassChangeError: class
org.springframework.core.type.classreading.ClassMetadataReadingVisitor has
interface...
分类:
编程语言 时间:
2014-06-13 16:38:47
阅读次数:
373
Path Sum:Given a binary tree and a sum, determine
if the tree has a root-to-leaf path such that adding up all the values along the
path equals the giv...
分类:
其他好文 时间:
2014-06-13 16:09:02
阅读次数:
237