码迷,mamicode.com
首页 >  
搜索关键字:minimum path sum    ( 52602个结果
boost 线程库
http://www.boost.org/Boost的安装step1.从www.boost.org下载boost库 step2 在 tools\build\jam_src目录下 运行build.bat来生成jamstep3 设置环境变量(后面的%PATH%要加) PATH=%boost的绝对路径%\...
分类:编程语言   时间:2014-05-16 03:11:46    阅读次数:433
sublime 配置python环境
1. 在工具栏点击Preferences,打开Browse Packages。在打开的文件夹中找到Python,并打开这个文件夹。找到文件Python.sublime-build,并打开。2. 修改以下内容:{"cmd": ["python", "-u", "$file"],"path":"D:/P...
分类:编程语言   时间:2014-05-16 00:18:23    阅读次数:253
ZOJ 3635 线段树
线段树维护的是区间有多少个空位置,每次查询第X个空位置在哪,sum[rt]>=X就向左区间找,sum[rt] #include #include #include using namespace std; #define lson l , m , rt << 1 #define rson m + 1 , r , rt << 1 | 1 const int maxn = 55555; int...
分类:其他好文   时间:2014-05-15 20:19:48    阅读次数:256
wikioi 1282 约瑟夫问题 线段树
和上一题一样,寻找第K个位置,只不过需要处理一下下一个位置在哪,画图看看就知道了。 #include #include #include using namespace std; #define lson l , m , rt << 1 #define rson m + 1 , r , rt << 1 | 1 const int maxn = 30000+5; int sum[maxn<<...
分类:其他好文   时间:2014-05-15 20:07:28    阅读次数:262
用Python更改图片尺寸大小
1、PIL包推荐Pillow。2、源码:#encoding=utf-8 #author:walker #date:2014-05-15 #function:更改图片尺寸大小 importos importos.path fromPILimportImage ‘‘‘ filein:输入图片 fileout:输出图片 width:输出图片宽度 height:输出图片高度 type:输出图片类型(png,gif,jpeg.....
分类:编程语言   时间:2014-05-15 19:07:57    阅读次数:266
nginx日志切割shell脚本
#!/bin/bash #function:cutnginxlogfilesshell #cp/usr/local/nginx/logs/access.log/usr/local/nginx/logs/access.log.bak log_cut_path="/var/log/nginx" log_files_path="/usr/local/nginx/logs/" log_files_dir=${log_cut_path}$(date-d"yesterday"+"%Y")/$(date-d"yesterd..
分类:其他好文   时间:2014-05-15 18:49:50    阅读次数:244
C#运用反射调用其他程序集中的代码
加载程序集 AssMedicalAdvice = Assembly.LoadFrom(Path.Combine(Environment.CurrentDirectory, "Inscription.MedicalAdvice.Client.dll"));1.调用静态函数...
分类:其他好文   时间:2014-05-15 17:54:29    阅读次数:248
信息写入记事本方法
/// /// 信息写入记事本 /// /// /// public static void Write(string text, string path) { try { DateTime newDat...
分类:其他好文   时间:2014-05-15 17:51:53    阅读次数:262
[LeetCode] [Add Binary 2012-04-02 ]
Given two binary strings, return their sum (also a binary string).For example, a = "11" b = "1" Return "100".string 的操作,短string补位。两个“0”会输出一个“00”,要特殊处理...
分类:其他好文   时间:2014-05-15 17:47:57    阅读次数:283
[leetcode]_Minimum Depth of Binary Tree
第五道树题,10分钟之内一遍AC。做树题越来越有feel~题目:求一棵树从root结点到叶子结点的最短路径。思路:仍然是递归。如果一个结点的左右子树任意一边为Null,该子树的minDepth应为非null子树的高度+1;如果一个结点的左右子树两边都非Null,则该子树的minDepth应为两个子树...
分类:其他好文   时间:2014-05-15 17:24:43    阅读次数:226
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!