点击打开链接
求MST的最长边~
prim
#include
#include
#include
#include
#define Min(a,b) (a)<(b)?(a):(b)
using namespace std;
const int INF = 1000000000;
const int maxn = 2000 + 5;
struct pto
{...
分类:
其他好文 时间:
2014-06-11 06:45:17
阅读次数:
235
linux下编译hello.c 程序,使用gcc hello.c,然后./a.out就可以运行;在这个简单的命令后面隐藏了许多复杂的过程,这个过程包括了下面的步骤
宏定义展开,所有的#define 在这个阶段都会被展开
预编译命令的处理,包括#if #ifdef 一类的命令
展开#include 的文件,像上面hello world 中的stdio.h , 把stdio.h中...
分类:
系统相关 时间:
2014-06-10 15:11:16
阅读次数:
414
public static String sendPost(String url, String
param)throws Exception { PrintWriter out = null; BufferedReader in = null;
Stri...
分类:
其他好文 时间:
2014-06-10 09:30:00
阅读次数:
234
try{
String cmds="java -version";
Process p = Runtime.getRuntime().exec(cmds);
int exitValue = 1;
if((exitValue = p.waitFor()) != 0)
{
p.destroy();
System.out.println("exitValue:"+exitValue);
...
分类:
编程语言 时间:
2014-06-10 07:57:42
阅读次数:
341
以前碰到过好几次eclipse不能自动弹出提示的情况,每次总是弄好之后就不再管它,结果下次遇到相同的问题,又到网上去搜索一大堆答案很多都不能解决实际问题,费了时间还没有效果,现在这里记录下来以下两种方法:
一、只弹出简单的单词提示(如输入system.的时候自动弹出out、in等字段的那种):
点击eclipse上面的windows-->
preferences --> ...
分类:
系统相关 时间:
2014-06-10 06:34:14
阅读次数:
320
获取资源timeout:异常信息如下:Caused by:
java.sql.SQLException: An attempt by a client to checkout a Connection has timed
out.[Cause: com.mchange.v2.resourcepool...
分类:
其他好文 时间:
2014-06-09 19:30:09
阅读次数:
728
子类在继承父类后,创建子类对象会首先调用父类的构造函数,先运行父类的构造函数,然后再运行子类的构造函数,例如以下所看到的:class
Father{ public Father(){ System.out.println("I am father"); }}public class Child
e....
分类:
编程语言 时间:
2014-06-09 19:22:33
阅读次数:
203
System.out.println("java版本号:" +
System.getProperty("java.version")); // java版本号 System.out.println("Java提供商名称:"
+ System.getProperty("java....
分类:
其他好文 时间:
2014-06-09 17:16:33
阅读次数:
210
刚安装了,office2010,打开里面的access时,总是提示要配置Office single
image,但打开word和excel没问题,很是不舒服在网上找到N种方法,试下来还是不行。后来就把office2010卸掉,重新安装了一下,安装的时候,只把里面用不到的输入法、publish,out...
分类:
数据库 时间:
2014-06-09 16:52:40
阅读次数:
338
项目里面 需要对已手机号码进行 如下的显示比如15088688388
要显示为150****8388的效果实现这个简单的效果
方法有很多我想试试用正则表达式去实现查了点资料最终试出来以下方法可行System.out.println("15088688388".replaceAll("(\\d{3})...
分类:
其他好文 时间:
2014-06-08 19:00:34
阅读次数:
203