1:安装好MinGW及GCC编译器后,当然MinGW全安装最保险了,不会太费劲2:配置环境变量(注:可能需要重启后生效)计算机-->属性-->高级系统设置-->环境变量-->系统:path中添加C:\MinGW\bin;当然MinGW是安在C盘下,按不同路径修改对于c++程序来说,使用下面的命令来编...
分类:
编程语言 时间:
2014-07-29 11:24:16
阅读次数:
251
mportosdeffindExtension(path,el):if(os.path.exists(path)):try:items=os.listdir(path)foriteminitems:if(os.path.isfile(os.path.join(path,item))):print(i...
分类:
其他好文 时间:
2014-07-29 11:09:46
阅读次数:
244
#定义编译选项CXX = g++ #设置“CXXFLAGS”环境变量CXXFLAGS = -g -Wall -O0 -std=c++0x#定义头文件目录,链接库目录,链接文件INCLUDE_PATH = ../frame/3rdInc/eluna/ ../frame/3rdInc/glog ../....
分类:
其他好文 时间:
2014-07-29 10:54:46
阅读次数:
278
block变量上一篇 讲的是block静态变量的特性,这里我们来看一下_block变量。引用官方:You can specify that an imported variable be mutable—that is, read-write— by applying the__blockstora...
分类:
其他好文 时间:
2014-07-29 10:30:16
阅读次数:
287
说实话,这题参考的:http://blog.csdn.net/u013382399/article/details/38227917倒着BFS就把我难住了T T,原来这样倒着BFS一遍,遍历完所有的点后就能得到每一点到终点的最短距离啊(其实做完反思后仔细想了想,发现其实当第一次bfs到首节点时,该图...
分类:
其他好文 时间:
2014-07-28 23:49:34
阅读次数:
253
1.0 配置环境变量export GOPATH=/website/apple/appsexport PATH="/usr/local/bin:${PATH}:${GOPATH}/bin"2.0 bee快速创建beego项目tt:~ tusm$ bee new apptt:~ tusm$ cd $G....
分类:
其他好文 时间:
2014-07-28 23:42:44
阅读次数:
305
在学习java的时候需要配置环境变量,但是为什么需要配置path和classpath这2个环境变量呢? ?? ?(1) 首先,搞起清楚path这个环境变量的作用。我们cmd到dos命令窗口的时候,输入ipconfig。 ?? ??? ?其实它...
分类:
编程语言 时间:
2014-07-28 16:58:44
阅读次数:
273
题意:给定两个素数四位m,n(不含前导0),求从m转化到n至少需要几次
转化规则:每次转化y与x只有一位数字不同,且y为素数
若能从m转化为n,输出转化的最小次数,否则输出Impossible
分析:因为要用到四位数的素数,首先用筛选法求出素数.然后分别只变换个位,十位,百位,千位四种情况来bfs
注意:最高位数字不能为0,对于四位素数肯定都是奇数,这样可以减少bfs次数...
分类:
其他好文 时间:
2014-07-28 16:24:53
阅读次数:
186
# include
# include
# include
# include
using namespace std;
struct point
{
double left,right;
}p[2010],temp;
bool cmp(point a,point b)
{
return a.left<b.left;
}
int main()
{
int n,i,count,fla...
分类:
其他好文 时间:
2014-07-28 16:20:33
阅读次数:
208
Description
You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able...
分类:
其他好文 时间:
2014-07-28 16:14:11
阅读次数:
257