new document div{position:absolute;width:200px;height:200px;left:0;top:0;right:0;bottom:0;margin:auto;border-radius:50%;backgroun...
分类:
Web程序 时间:
2014-06-18 21:43:53
阅读次数:
358
css:#profile_block{text-align:center;position:absolute; top:60px; right:10px;}#blog-calendar{border-radius: 7px;background:#fff;}#p_b_follow{padding-t...
分类:
其他好文 时间:
2014-06-18 19:09:20
阅读次数:
198
left content right content main content
分类:
其他好文 时间:
2014-06-18 19:01:14
阅读次数:
125
Right-BICEPRight首先,我们需要知道什么是正确的.这是最基本的.Boundary边界是否所有的边界条件都正确?CorrectConformance一致性结果值是否和期望值一致.Ordering顺序性值是否跟期望一样,是有序/无序的.Range区间性值是否位于合理的最大值和最小值之间.R...
分类:
其他好文 时间:
2014-06-17 19:51:20
阅读次数:
166
我们在一个母字符串中查找一个子字符串有很多方法。KMP是一种最常见的改进算法,它可以在匹配过程中失配的情况下,有效地多往后面跳几个字符,加快匹配速度。当然我们可以看到这个算法针对的是子串有对称属性,如果有对称属性,那么就需要向前查找是否有可以再次匹配的内容。在KMP算法中有个数组,叫做前缀数组,也有...
分类:
其他好文 时间:
2014-06-17 00:24:23
阅读次数:
212
继续校赛前的建图任务,当时只写了DFS遍历,今天把BFS也写了一下。
#include
#include
#include
#include
#include
const int maxe = 10001;
using namespace std;
struct node{
int to,w;
node *next;
}*head[maxe];//he...
分类:
其他好文 时间:
2014-06-16 22:25:20
阅读次数:
286
PHP 获取数组任意下标key的上一个prev和下一个next下标值
$value){
$steps->add($key);
}...
分类:
Web程序 时间:
2014-06-16 22:07:56
阅读次数:
308
不是BST,那么搜索两节点的LCA就复杂点了,因为节点是无序的。
下面是两种方法,都写进一个类里面了。
当然需要重复搜索的时候,可以使用线段树及多种方法加速搜索。
#include
#include
using namespace std;
class LCANormalTree
{
struct Node
{
int key;
Node *left, *right;...
分类:
其他好文 时间:
2014-06-16 20:20:04
阅读次数:
234
题目
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
If such arrangement is not possible, it must rearrange it as the low...
分类:
其他好文 时间:
2014-06-16 18:48:33
阅读次数:
170
demo代码如下。欢迎指正与讨论。#include<iostream>
#include<queue>
#include<stack>
usingnamespacestd;
template<typenameT>
structBinaryNode{
Telem;
BinaryNode*left;
BinaryNode*right;
BinaryNode(Td,BinaryNode*l=NULL,BinaryNode*r=NUL..
分类:
其他好文 时间:
2014-06-16 16:35:05
阅读次数:
278