自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(149)
  • 收藏
  • 关注

原创 ubuntu14.04在忘记密码的情况下,重设密码

1、进入启动界面选择"ubuntu XX  高级选项"2、选择进入Recovery Mode(恢复模式)3、执行chattr#chattr  -i  /etc/passwd#lsattr  -v  /etc/passwd#chattr -i   /etc/shadow4、同步文件pwconv5、成功修改密码passwd   usr账户  (如果为空,则默认是

2016-04-14 16:48:25 902

转载 windows下Python3.4安装numpy时出现 “Unable to find vcvarsall.bat ”

问题:Python34/Lib/distutils目录下,发现“unable to find vcvarsall.bat”这句话在msvc9compiler.py中问题出在构建python的VS版本和你计算机上安装的版本不一样。解决:msvc9compiler.py中修改MSVCCompiler函数:vc_env = query_vcvarsall(VERSION, pla

2015-12-18 17:39:00 1671

原创 关于windows和ubuntu双系统引导修复的问题

1、先使用“老毛桃”制作启动盘,使用启动盘修复windows,

2015-09-28 10:00:41 860

原创 the use of github in the Ubuntu

1、首先安装 git sudo apt-get install git2、申请github帐号并登陆GitHub,然后,在右上角找到“Create a new repo”按钮,创建一个新的仓库:假设为 lmdb3、此时在本地也建个同样的目录 lmdb 并进入。4、在当前目录使用git init 对本地仓库初始化。5、将本地与github 的仓库进行链接:gi

2015-09-28 09:43:34 582

原创 ubuntu下mysql datetime类型错误 Out of range value for column

导入csv数据到mysql遇到的问题:(1)使用load data infile   filePath   into table tableName  fields terminated by ','  lines terminated by'\r\n';  语句向tableName表中导入csv文件,出现 Out of range value for column(#1264)问题。

2015-04-14 17:48:48 2157

转载 ubuntu下使用PIL中的show函数,无法显示图片的问题

问题描述:ubuntu14.04系统,python2.7(version),正在学习python中,import Imageim = Image.open('1.jpg')im.show()没有提示错误,im.size等属性显示正常,但就是没有图片显示。问题解析:调用Python的标准图像库里show()函数,有可能无法显示图片。因为它调用了xv,但xv在后面的ubuntu版本

2015-04-12 20:53:17 4709

原创 caffe下安装python库

1、文件caffe-master/python/requirements.txt 列举了Caffe依赖的python库,最简单的方法是用pip安装,pip的安装方法:curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.pysudo python get-pip.py如果命令不能直接运行,则可以直接打开上面的

2015-04-06 10:08:50 2801

原创 caffe Ubuntu14.0.4 64bit 环境配置说明(无CUDA)

因为电脑显卡不是英伟达的,不能用cuda,所以在此配置的是不包含cuda的caffe。1、安装build-essentials(开发所需要的一些基本包)sudo apt-get install build-essential2、安装ATLAS for Ubuntusudo apt-get install libatlas-base-dev注:ATLAS,

2015-03-31 22:03:39 3782

原创 hdu1026(bfs + priority_queue + 寻找路径)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1026题目本身不复杂,不过输出路径比较麻烦,不过又想练习用下优先队列,所以有了以下的代码:#include #include #include #include #include #include using namespace std;#define LL long longi

2014-12-24 20:43:36 482

转载 【OpenCV】imread读取数据为空的解决方案(被坑了一下午)

解决方案:http://blog.csdn.net/daisy327/article/details/12755757

2014-11-19 15:28:10 4079

转载 emgucv下载与安装

下载地址:http://sourceforge.net/projects/emgucv/files/emgucv/1.5.0.0/

2014-11-02 16:31:49 3737

转载 【OpenCV二】flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题

转载地址:http://blog.csdn.net/guoming0000/article/details/8838810

2014-09-28 09:41:59 585

转载 【OpenCV一】 OpenCV 2.4.9 +VS2012的开发环境配置

参考博客:http://blog.csdn.net/huang9012/article/details/21811129

2014-09-28 09:30:03 864

原创 windows7未能连接一个windows服务(无法连接网络)的解决方法

今天下午不知道怎么搞的,就搞的无线不可以用了,出现了个  “windows7未能连接一个windows服务”问题,而且连eclipse都打不开了。晚上在网上找了一个方法,终于搞定了。方法:是重新安装了下360,然后它自动检测出来要修复LSP文件,然后就点击,再重启后就搞定了。下面这篇文章可能也有用:http://iecspace.ecjtu.org/posts/connect-to-w

2014-03-01 18:21:22 7094 1

原创 hdu——3032(博弈之寻找sg函数)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3032g(0)=0,g(1)=1。状态2的后继有0,1和(1,1),它们的SG函数值分别是0,1和0,所以g(2)=2。状态3的后继有0,1,2和(1,2),它们的SG函数值分别是0,1,2和3,所以g(3)=4。状态4的后继有0,1,2,3,(1,3)和(2,2),它们的SG函数值分

2013-08-31 20:48:54 662

原创 poj——3660(图论之传递闭包(floyd))

题目地址:http://poj.org/problem?id=3660注:floyd的另个运用。#include #include #include #include #include #include using namespace std;typedef long long ll; #define MAX(a,b) a>b?a:b#define MIN(a,b) a>

2013-08-31 19:44:39 656

原创 SPOJ Equation :求 1/n!=1/x+1/y 的解的个数

题目地址:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=29547#problem/M解析:题目就是求1/n! = 1/x + 1/y 的解的个数,看样例知要考虑(x,y)对数的关系。设 m=n! ,由等式知x,y必定大于n!,所以再设 x=n!+k=m+k 带入 1/m=1/x+1/y 中化简得到y=m*m/k+m,因

2013-08-25 16:28:44 1086

原创 poj——1080(dp)

题目地址:http://poj.org/problem?id=1080解析:dp[i][j]来由:1.dp[i][j-1]转移,则‘-’和s2[j]匹配。2.dp[i-1][j]转移,则s1[i]和‘-’匹配。3.dp[i-1][j-1],则s1[i]和s2[j]匹配。三者取最大值即可。#include #include #include #include #inclu

2013-08-25 13:45:00 620

原创 poj——1088(dp之递归加记忆化搜索)

题目地址:http://poj.org/problem?id=1088小结:可以用递归+记忆化搜索dp[i][j]:从i j 开始的最长的路径。dp[i][j] = max {dp[i][j-1], dp[i][j+1], dp[i-1][j], dp[i+1][j], 0} + 1;即当前的路径只与它的上、下、左、右的路径有关。#include #include

2013-08-25 11:39:02 645

原创 hdu——4462(暴力枚举)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=4462解析:不知道为什么正确的程序被判成W了,后来再提交W的程序就过了。(囧啊)。#include #include #include #include #include #include using namespace std;typedef long long ll;#def

2013-08-23 19:38:44 544

原创 poj——1019(数学)

题目地址:http://poj.org/problem?id=1019小结:看到网上许多题解都是找规律的,其实不找规律也是可以做的。如下:#include #include #include #include #include #include #include #include using namespace std;typedef long long ll;#defin

2013-08-23 13:07:15 502

原创 hdu——1754(线段树求最值)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1754开始时一直超时,不知道原因,参考了网上的这篇(http://blog.csdn.net/panyanyany/article/details/6776300)博客才知道,是宏定义的原因。#include #include #include #include #include #i

2013-08-23 12:20:24 511

翻译 树状数组解决区间问题(参考博客)

博客地址:http://www.cnblogs.com/ambition/archive/2011/04/06/bit_rmq.htmlhttp://blog.csdn.net/zsc09_leaf/article/details/6530345

2013-08-22 10:17:42 476

原创 poj——1159(dp之最长公共子序列)

题目地址:http://poj.org/problem?id=1159注:C++运行时Runtime Error,G++过了。(这编译器,真无语了)。#include #include #include #include #include #include using namespace std;typedef long long ll;#define INF 0xffff

2013-08-21 21:18:19 722

原创 poj——1789(图论之最小生成树的简单应用)

题目地址:http://poj.org/problem?id=1789小结:现在才知道原来prime和dijkstra只有很小一部分不一样。#include #include #include #include #include #include using namespace std;typedef long long ll;#define INF 0xfffffff#

2013-08-21 20:49:18 798

原创 hdu——1166(数据结构之树状数组的简单应用)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1166#include #include #include #include #include #include using namespace std;typedef long long ll;#define INF 0xfffffff#define MAX(a,b) a>b?a

2013-08-21 20:19:30 534

原创 poj——1833(组合数学之排列数)

题目地址:http://poj.org/problem?id=1833在poj上G++没过,C++过了,下面摘的网上的解释。G++是一个GNU编译器,而C++是微软VC++的编译器。这两种编译器对不同的地方有优化,因此速度谁快谁慢不一定吧。有些题目使用C++提交相同的代码运行时间只有G++的八分之一,很是让人费解(可能是POJ是windows为基础的原因吧)。G++中对栈内存有优化,允许定

2013-08-21 09:41:15 849

原创 hdu——1023(Catalan数)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1023解析:第一个自己写的Java程序,纪念下。import java.util.Scanner;import java.math.*;public class Main { public static void main(String []argu){ Scanner

2013-08-21 09:12:56 528

原创 hdu——3292(数论之佩尔方程)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3292解析:当N为平方数的时候显然没解,然后先枚举找到一个特解(最小的),然后利用佩尔方程的通用矩阵形式加上快速幂求解。#include #include #include #include #include #include #include #include using na

2013-08-18 15:05:37 785

原创 poj——1305(数论之毕达哥拉斯三元组求解(构造法)

题目地址:http://poj.org/problem?id=1305#include #include #include #include #include #include #include #include using namespace std;typedef long long ll;#define INF 0x3ffffffffLL#define MAX(a,

2013-08-18 14:27:08 1280

原创 poj——2142(数论之不定方程求解)

题目地址:http://poj.org/problem?id=2142#include #include #include #include #include #include #include using namespace std;typedef long long ll;#define INF 0x3ffffffffLL#define MAX(a,b) a>b?a:b

2013-08-18 13:58:51 798

原创 poj——2299(归并排序求逆序数对)

题目地址:http://poj.org/problem?id=2299参考地址:http://blog.csdn.net/lyy289065406/article/details/6647346#include #include #include #include #include #include #include #include using namespace std

2013-08-17 16:37:58 640

原创 sgu——261(数论之N次剩余问题)

题目地址:http://acm.sgu.ru/problem.php?contest=0&problem=261小结:涉及到测试法求元根、线性方程求解、离散对数问题,是数论里代码多的问题,但是基本上就是个模板题。#include#include#include#include#include#includeusing namespace std;typedef long lo

2013-08-17 09:41:35 985

原创 hdu——2815(数论之Baby Step Giant Step解决离散对数问题)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2815可借鉴地址:http://blog.csdn.net/acm_cxlove/article/details/7832197小结:可以说的上是个模板题。#include #include #include #include #include #include using na

2013-08-16 20:33:26 1191

原创 hdu——3951(对称博弈)

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3951题意:给你n个硬币排成一圈,编号1-n,只能翻转连续的1~k个的硬币。翻最后一枚硬币者赢。    1) 若k=1,则一次只能去翻一枚,奇数先手赢,偶数后手赢。    2)若k>1:    a: 先手一次翻完,先手赢;    b: 先手不能翻完,第一次必定

2013-08-15 21:36:24 745

翻译 sgu——221(动态规划)

题目地址:http://acm.sgu.ru/problem.php?contest=0&problem=221题目简单描述:在一个n*n的棋盘上放置k个主教(吃对角线),使其互不攻击的方案有几种 ?(n总结:开始时也考虑到利用斜线的特殊性了,只是没再下去想,还以为会有规律那。感觉此题挺开放思维的。借鉴博客地址:http://fqq11679.blog.hexun.co

2013-08-15 21:05:55 706

原创 CF——#150div2B

题目地址:http://codeforces.com/contest/244/problem/B解析:深搜下就可以了。#include #include typedef long long ll;using namespace std;#define N 1005ll ans;int flag[15];ll n;int check(int x){ int temp;

2013-08-15 20:59:21 721

原创 sgu——169、178

题目地址:http://acm.sgu.ru/submit.php?problem=169http://acm.sgu.ru/submit.php?problem=178169解析:因为n和n+1相邻,因此两者的P(n)必然也相邻,且为一位数,则要求n的前导必然为1,只有最后一位可以变动,现在讨论最后一位。(结尾为1、2、5的时候,p(n)显然满足,作为已知)为1的时候必然成立,为

2013-08-15 09:54:01 850

原创 POJ——2429(数论之大整数分解)

题目地址:http://poj.org/problem?id=2429解析:题目的关键就是把lcm/gcd的大数分解成质因子之积。(可以用容斥原理求出所有的情况,然后选出来a+b最小的情况。)#include #include #include #include #include #include #include #include using namespace std;

2013-08-14 14:01:53 1015

原创 博弈论之概要

题目地址:http://acm.hrbeu.edu.cn/index.php?act=contest&cid=45http://acm.hust.edu.cn/vjudge/contest/view.action?cid=29113#overview总结借鉴地址:http://www.cnblogs.com/-sunshine/archive/2012/09/08/2676344.ht

2013-08-14 10:32:42 545

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除