题意 有n个空间站 接下n行依次输入n个空间站的x,y,z坐标和半径 求连接所有空间站总共至少要修多长的桥
也是裸的最小生成树 注意距离不会小于0 就是两个空间站相交的时候
#include
#include
#include
#include
using namespace std;
const int N = 105, M = 10050;
int par[N], n, m;
d...
分类:
其他好文 时间:
2014-10-23 12:37:36
阅读次数:
283
9.3 Tempdb的并发阻塞
在介绍Tempdb的并发问题前,先介绍几个比较特殊的数据页。
PFS(Page Free Space),用于标识数据页空间的使用情况,以字节标识,可以表示数据页使用百分比,例如使用百分五十,百分八十,百分九十五以及完全被使用,同时,还有一个字节位表示数据页的类型,例如...
分类:
数据库 时间:
2014-10-23 12:14:28
阅读次数:
274
1 2 3 4 5 6 39 40 41 42 单个字符43 风44 流45 倜46 傥47 48 49 用脚本自动美化:50 51 恋爱容易婚姻不易,且行且珍惜。52 53 81 82 新知识:white-space: pre; /* 处理空格 */co...
分类:
Web程序 时间:
2014-10-23 01:16:39
阅读次数:
252
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
关键点:1)判断链表是否有环。
2)一个小坑在判断root和root的next是否为空上。
3)可以看为追及问题。最关键的坑在判断快走(每次走2步的节点),走1步会...
分类:
其他好文 时间:
2014-10-23 00:03:10
阅读次数:
276
堆表中 IAM 记录着的数据页,表的各个数据页之间没有联系。也就是说一个页面它不会知道自己的前一页是谁,也不知道自己的后一页是谁。插入数据时先找到IAM页,再由pfs(page free space)决定插入到哪里!
分类:
数据库 时间:
2014-10-22 21:34:53
阅读次数:
229
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-10-22 19:46:16
阅读次数:
220
1、Application应用程序的参数args的设置,在Build->Set Main Projects Configuration 2、程序运行快捷键F6 3、@Deprecated 4、代码自动完成Ctrl+Space,利用这个可以添加类的构造函数 5、变量统一修改Ctrl+R,取消用esc ...
分类:
Web程序 时间:
2014-10-22 18:08:26
阅读次数:
200
[Description] Given a unsort linked list, delete all the duplication from them, no temporary space permission.[Thought] Set two points, from head to t...
分类:
其他好文 时间:
2014-10-22 17:17:58
阅读次数:
120
Sort a linked list in O(n log n) time using constant space complexity.
思路:要想时间复杂度达到O(n log n)
,那么有两种,一种是合并排序,另一种是快速排序,而要想空间复杂度为常数,那么只能使用递归,本人使用的是递归的合并排序,代码如下:
/**
* Definition for s...
分类:
其他好文 时间:
2014-10-22 12:55:55
阅读次数:
200
SQL中的单记录函数1.ASCII返回与指定的字符对应的十进制数(注:是字符而非字符串);SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;A A ZERO SPACE--------- ...
分类:
数据库 时间:
2014-10-22 12:24:45
阅读次数:
273