题意:给你一颗树,让你求树的重心,树的重新的定义是如果去除掉这个节点,这个节点的子树节点个数的最大值 最小。解题思路:动态规划,树形dp在这里发现 vector 还是比 数组指针性能上差一些。解题代码: 1 // File Name: poj1741.cpp 2 // Author: darkdre...
分类:
其他好文 时间:
2014-10-05 11:46:58
阅读次数:
223
报错:danny is not in the sudoers file. This incident will be reported.解决方法如下: 1.进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。 2.添加sudo文件的写权限,命令是:c...
分类:
其他好文 时间:
2014-10-05 10:23:38
阅读次数:
218
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.List;
/**
* 将c:\cn目录下的所有.java文件复制到c:...
分类:
编程语言 时间:
2014-10-05 09:37:08
阅读次数:
388
# Firewall configuration written by system-config-firewall# Manual customization of this file is not recommended.*filter:INPUT ACCEPT [0:0]:FORWARD AC...
分类:
其他好文 时间:
2014-10-05 09:35:18
阅读次数:
222
CentOS+Nginx+PHP+MYSQL搭建好之后,跑PHP报“Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure y...
分类:
Web程序 时间:
2014-10-05 02:27:47
阅读次数:
205
语法:grep[-cinvABC]'word'filename-c :打印符合要求的行数-i :忽略大小写-n :在输出符合要求的行的同时连同行号一起输出-v :打印不符合要求的行-A :后跟一个数字(有无空格都可以),例如 –A2则表示打印符合要求的行以及下面两行-B :后跟一个数字,例如 –B2...
分类:
其他好文 时间:
2014-10-05 01:39:07
阅读次数:
170
题意:给你一个0,1矩阵 ,求精确覆盖解题思路:DLX解题代码: 1 // File Name: poj3740.cpp 2 // Author: darkdream 3 // Created Time: 2014年10月04日 星期六 20时06分31秒 4 5 #include 6...
分类:
其他好文 时间:
2014-10-04 23:35:38
阅读次数:
187
1.git status 看状态2.git add 添加一个文件到git index [file name]3.git log 看你commit的日志4.git commit -a 提交当前repos的所有的改变 git commit -m 添加commit信息5.git push or...
分类:
其他好文 时间:
2014-10-04 23:34:57
阅读次数:
228
printf("\r\n this is a usart printf demo \r\n");将串口定义成 printf 函数#include //重定向C库函数printf到USART1int fputc(int ch, FILE *f){ /* 发送一个字节数据到USART1 *...
分类:
其他好文 时间:
2014-10-04 23:02:47
阅读次数:
354
举例:String fName=”G:\Java_Source\navigation_tigra_menu\demo1\img\lev1_arrow.gif ”方法一:1 File tempFile =new File( fName.trim());2 String fileName = tempF...
分类:
编程语言 时间:
2014-10-04 22:43:57
阅读次数:
227