Apparently BFS is the most obvious one.. but it is not that simple - only constant extra space is provided.Then the only strategy to take is recursion...
分类:
其他好文 时间:
2014-07-22 00:39:35
阅读次数:
258
用G++过了,c++无限WA
就是一水,就是求输入的字符串中是否有一个是其他字符串的子串;
注意这种数据。。。
0000
010
01
9
字符串的长度从大到小;
#include
#include
#include
using namespace std;
char qq[20005];
struct node{
int q[2];
int w;
node...
分类:
其他好文 时间:
2014-07-22 00:30:36
阅读次数:
192
Grunt和Grunt插件都是通过npm安装并管理。npm是node.js的包管理器。 所以grunt必须在nodejs环境。通过npm安装并管理。 1,安装CLI npm install –g grunt-cli 这句话就是将grunt命令行(CLI)安装到全局环境中,这样以后就可以在任意子目录执...
分类:
Web程序 时间:
2014-07-22 00:21:33
阅读次数:
242
切换到 root 账号升级和更新整个系统:$ sudo -i# apt-get update# apt-get upgrade安装 Node.js 运行环境:# apt-get install g++ make python python-software-properties# add-apt-r...
分类:
Web程序 时间:
2014-07-22 00:14:37
阅读次数:
212
DP矩形镶嵌,打印路径与最长公共子序列相似。 1 #include 2 #include 3 #define doumax(a,b) (a>b?a:b) 4 const int maxn=100; 5 int mat[maxn][maxn],dp[maxn],n; 6 struct node{ 7 ...
分类:
其他好文 时间:
2014-07-21 14:36:28
阅读次数:
387
??一、http模块提供了两个函数http.request和http.get,功能是作为client向HTTPserver发起请求。 Ext.Ajax.request({},function(response))1.http.request(options,callback)发起HTTP请求,接受两...
分类:
Web程序 时间:
2014-07-21 14:22:05
阅读次数:
265
经过两天的的不懈努力,终于把环境配置好了。其中从淡定到蛋疼,从希望到失望再到绝望的过程我就不多说了。写本文的目的是不希望别人在配置环境时再像我一样遭受迷失在搜索引擎里的痛苦。闲话少说,直接上教程。(本文只为小白准备,大神勿喷,当然指正错误,俺还是笑着接纳地..
分类:
Web程序 时间:
2014-07-21 12:16:03
阅读次数:
428
# include
# include
# include
using namespace std;
struct node
{
int pos;
int d;
int num;
friend bool operator n2.d;//仍的距离从小到大
return...
分类:
其他好文 时间:
2014-07-21 11:43:44
阅读次数:
180
# include
# include
# include
using namespace std;
struct node
{
int y;
int val;
int num;
friend bool operatorn2.num;//从小到大
return...
分类:
其他好文 时间:
2014-07-21 11:36:44
阅读次数:
203
简单的二叉树的先根遍历模板的应用
class Solution:
# @param root, a tree node
# @return an integer
def hehe(self, num, root):
#再原来的基础上*10,再加上当前的root.val
num = num * 10 + root.val
...
分类:
其他好文 时间:
2014-07-20 22:45:33
阅读次数:
299