LeetCode: Clone GraphClone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serializatio...
分类:
其他好文 时间:
2014-08-23 20:21:31
阅读次数:
224
由于项目需要 所有的downserver node 都需要访问一个公共的布隆过滤器 也就是要做一个跨网络挺供的布隆过滤器服务中间产品。 同时要保证非常非常高的实时性 所以在这里 所以现在必须要做一个这样的中间服务系统。主要实现如下功能: 1 客户端远程传入一个需要存入读或者写入布隆过滤器的strin...
分类:
其他好文 时间:
2014-08-23 20:17:31
阅读次数:
189
解题报告
思路:
裸裸的最短路。
#include
#include
#include
#include
#define inf 0x3f3f3f3f
#define N 40000
#define M 100000
using namespace std;
struct node
{
int v,w,next;
}edge[M];
int head[N],dis[N],vi...
分类:
其他好文 时间:
2014-08-23 19:05:51
阅读次数:
162
/*
很明显的最大权闭合图题
*/
#include
#include
#include
using namespace std;
#define N 2100
#define inf 0x3fffffff
struct node {
int u,v,w,next;
}bian[N*N*20];
int head[N],yong,dis[N],work[N];
void init(){
yong=...
分类:
其他好文 时间:
2014-08-23 16:51:11
阅读次数:
251
LeetCode: Copy List with Random PointerA linked list is given such that each node contains an additional random pointer which could point to any node ...
分类:
其他好文 时间:
2014-08-23 12:34:30
阅读次数:
193
#include #include #include #include #define INF 0x3f3f3f3fusing namespace std;struct node{ int u,v,w,next;}edge[150001];int head[30001],dis[30001],...
分类:
其他好文 时间:
2014-08-23 09:55:10
阅读次数:
186
一年之前的做的小项目,过了许久,翻出当时的PPT文档总结一下。源码下载:https://github.com/CreekLou/chatRoom
Nodejs背景简介
1 ,JavaScript最早是运行在浏览器中,然而浏览器只是提供了一个上下文
2 ,node.js事实上就是另外一种上下文,它允许在后端(脱离浏览器环境)运行JavaScript代码
3 ,Node.js事实上既是一个...
分类:
Web程序 时间:
2014-08-23 01:10:29
阅读次数:
270
由于题目意思是满二叉树:所以,对当前节点,设置它的左右子节点的next指针即可root->left->next = root->rightroot->right->next = root->next?root->next->left:NULL 1 /** 2 * Definition for bi....
分类:
其他好文 时间:
2014-08-22 22:24:49
阅读次数:
233
同上题:但是这题需要考虑好对当前节点的left和right的next指针如何设置。 1 /** 2 * Definition for binary tree with next pointer. 3 * struct TreeLinkNode { 4 * int val; 5 * Tre...
分类:
其他好文 时间:
2014-08-22 22:23:59
阅读次数:
324
解题报告
思路:
求解:
p:a-b=x
v:a-b>=1
的方程
#include
#include
#include
#include
#define inf 0x3f3f3f3f
using namespace std;
struct node
{
int v,w,next;
} edge[220000];
int head[1111],dis[1111],vis...
分类:
其他好文 时间:
2014-08-22 14:29:28
阅读次数:
192