码迷,mamicode.com
首页 >  
搜索关键字:path sum    ( 49923个结果
Codeforces Helpful Maths
Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. The teacher has written down the sum of multiple numbers. Pupils should ca...
分类:其他好文   时间:2014-07-22 23:05:53    阅读次数:382
UVA 1484 - Alice and Bob's Trip(树形DP)
题目链接:1484 - Alice and Bob's Trip 题意:BOB和ALICE这对狗男女在一颗树上走,BOB先走,BOB要尽量使得总路径权和大,ALICE要小,但是有个条件,就是路径权值总和必须在[L,R]之间,求最终这条路径的权值。 思路:树形dp,dp[u]表示在u结点的权值,往下dfs的时候顺带记录下到根节点的权值总和,然后如果dp[v] + w + sum 在[l,r]内,...
分类:其他好文   时间:2014-07-22 23:05:33    阅读次数:486
asp.net,copy网页的代码去掉格式化代码前面的序号
string path = Server.MapPath("copycode/code.txt"); string[] allCodeLine = System.IO.File.ReadAllLines(path, System.Text.Encoding.UTF8); System.Text.StringBuilder strb = new Sys...
分类:Web程序   时间:2014-07-22 23:02:54    阅读次数:366
String path = request.getContextPath();这段什么用
答:这样的代码是在jsp里出现的吧, 那么他的含义就是为了得到一个路径, 做动态网站时,需要提交form表单 在表单的action里面就会这样来写 action="/add.do" 这样来提交到相应的servlet中去,这样可以避免路径的错误,而采用这样的相对路径会更好些答:request.getC...
分类:其他好文   时间:2014-05-01 21:19:06    阅读次数:351
python学习笔记九——文件与目录
1.python进行文件读写的函数是open或file类 mode:r 只读 r+ 读写 w 写入,先删除原文件,再重新写入,如果文件没有则创建 w+ 读写,先删除原文件,再重新写入,如果文件没有则创建(可写入和输出) a 写入,在文件末尾追加新的内容,文件...
分类:编程语言   时间:2014-05-01 21:00:16    阅读次数:402
Yii在window下的安装方法
首先,在http://www.yiichina.com/上下载yii 然后,配置系统环境变量,在win8下,按win+x,找到系统->高级系统设置->环境变量->path 把php的运行环境,加入到环境变量中,以分号隔开。如,我的是D:\wamp\bin\php\php5.4.1...
分类:Windows程序   时间:2014-05-01 20:42:59    阅读次数:470
[伯努利数] poj 1707 Sum of powers
题目链接: http://poj.org/problem?id=1707 Language: Default Sum of powers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 735   Accepted: 354 D...
分类:其他好文   时间:2014-05-01 18:36:32    阅读次数:385
[ACM] hdu 1003 Max Sum(最大子段和模型)
Max Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 135262    Accepted Submission(s): 31311 Problem Description   Given a sequen...
分类:其他好文   时间:2014-04-30 22:21:40    阅读次数:280
heat笔记之为diskimage-builder编写elements生成一个lamp镜像
建立elements目录 mkdir -p elements/lamp/install.d/ vim 70-lamp #!/bin/bash set -eux install-packages wordpress mariadb-server httpd memcached 生成一个带wordpress的镜像 export ELEMENTS_PATH=...
分类:其他好文   时间:2014-04-29 13:14:21    阅读次数:475
Leetcode:Add Binary 二进制相加
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 思路同十进制的大数相加。代码如下: class Solution { public: string addBinary(string a, str...
分类:其他好文   时间:2014-04-29 13:12:20    阅读次数:328
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!