OJ题目 :
click here~~
题目分析:给一个数字三角形,从最上面一个数字开始,方向只能往左下或者右下,一直到最后一行,求经过的所有数字和的最大值。
搞清楚在输入的数据中,route的方向就行。
AC_CODE
int num[102][102];
int main(){
int n , i , j , k ;
while(cin >> n){
...
分类:
其他好文 时间:
2014-07-22 23:05:55
阅读次数:
372
安装libpng,出现“configure: error: ZLib not
installed”。
解决方法:
1. 进入ZLib的安装包,不必加--prefix参数命令:
./configure
make && make install
2. 进入libpng解压缩包中,输入:
./configure --prefix=/...
分类:
其他好文 时间:
2014-05-02 22:38:51
阅读次数:
289
一,socket 模块
套接字包括两类:服务器,客户机,
创建一个套接字后让它等待连接
服务器:
import socket
s = socket.socket()
port = 1234
host = socket.gethostname()
print host
s.bind((host,port))
s.listen(5)
while True:
get,addr = s...
分类:
编程语言 时间:
2014-05-02 21:59:57
阅读次数:
444
1. 自定义验证--成功提示
1) 添加选项
errorClass: "unchecked",
validClass: "checked",
errorElement: "span",
errorPlacement: function (error, element) {
if (element.parent().find("span[for=""" + element.attr("id...
分类:
Web程序 时间:
2014-05-02 18:38:21
阅读次数:
467
今天,所谓的劳动节,其实只是给予大部分行业的人,但是对于技术类或者是服务行业,都是没有所谓的休息假期。因为每次放假,反而是一个商机。
早上,刚整理完店面摆设,没多久就来了一位客户需要重装电脑。说电脑中毒,一开机检测, disk error, 问是否需要保存资料,得到的是“...
分类:
其他好文 时间:
2014-05-02 12:47:30
阅读次数:
354
出现下列错误:
mlogc.c:32:23: error: curl/curl.h: No such file or directory
mlogc.c:1091: error: expected ‘)’ before ‘*’ token
mlogc.c: In function ‘logc_init’:
出错原因:缺少libcurl-dev or libcurl-devel
...
分类:
其他好文 时间:
2014-05-02 10:50:35
阅读次数:
371
编译Lua时,出现这样的错误:
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lua.o lua.clua.c:67:31: error:
查阅了一下,centOS上需要安装readline-devel ncurses-devel
yum install readline-devel ncurses-devel
...
分类:
系统相关 时间:
2014-05-02 07:03:00
阅读次数:
455
Say you have an array for which theithelement
is the price of a given stock on dayi.If you were only permitted to complete at
most one transaction (ie...
分类:
其他好文 时间:
2014-05-02 00:37:20
阅读次数:
349
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' marker from transaction definition...
分类:
数据库 时间:
2014-05-01 18:16:35
阅读次数:
377
示例代码将在注册表位置:HKEY_CURRENT_USER\Software\ 读写键值
bool LicenseManage::OpenRegKey(HKEY& hRetKey)
{
if (ERROR_SUCCESS == RegOpenKey(HKEY_CURRENT_USER,"Software", &hRetKey))
{
return true;
...
分类:
其他好文 时间:
2014-04-30 22:12:40
阅读次数:
195