题目:http://acm.hdu.edu.cn/showproblem.php?pid=4405
e[i]:当前在位置i还需要走的步数期望
受刘汝佳的AC自动机那个后缀链接写法的启发,我的x[i]通过逆序算出来连续有“flight line ”的时候,能到达的最远距离, rep(i,0,m)
{
scanf("%d%d",&xx,...
分类:
其他好文 时间:
2014-07-29 14:22:38
阅读次数:
252
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2014-07-18 20:09:38
阅读次数:
433
//http://main.edu.pl/en/archive/oi/20/tak#include #include #include using namespace std;typedef long long LL;#define rep(i,n) for (LL i=1,n__=n;i>d>>m...
分类:
其他好文 时间:
2014-07-06 17:43:50
阅读次数:
155
上文讨论了PAIR/PAIR,REQ/REP两种模式,现在看看PUB/SUB和PUSH/PULL模式。PUB/SUB:发布订阅模式,跟我们订阅新闻类似的,采用异步IO,多对多模式,如果没有订阅,服务端发送的消息直接丢弃掉。pub_server.pyimportzmq
importrandom
importsys
importtime
port="5556"
iflen(s..
分类:
其他好文 时间:
2014-06-28 06:38:09
阅读次数:
649
FlatBuffers发布时,顺便也公布了它的性能数据,具体数据请见Benchmark。
它的测试用例由以下数据构成"a set of about 10 objects containing an array, 4 strings, and a large variety of int/float scalar values of all sizes, meant to be rep...
分类:
其他好文 时间:
2014-06-25 09:56:50
阅读次数:
431
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2014-06-20 15:30:19
阅读次数:
227
Dropbox很好用。但是我现在也没弄明白到底哪里好用了。不如试试中国的金山快盘。。起码不会担心被墙。
cd ~/Kuaipan/rep
git --bare init //初始化仓库
cd ~/Workspace //进入工作目录
git init //在当前目录下初始化一个本地Git库
git add . //将当前目录下所有文...
分类:
其他好文 时间:
2014-06-14 07:11:28
阅读次数:
277
Given a binary tree containing digits
from0-9only, each root-to-leaf path could represent a number.An example is the
root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2014-06-06 12:38:42
阅读次数:
255
btn.enabled=NO;` NSTimer * notificationTimer =
[NSTimer scheduledTimerWithTimeInterval:10*60.0
target:selfselector:@selector(enable) userInfo:nil rep....
分类:
其他好文 时间:
2014-06-04 18:08:11
阅读次数:
199
Y2K Accounting BugDescriptionAccounting for
Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital
data for preparing annual rep...
分类:
其他好文 时间:
2014-06-02 00:57:42
阅读次数:
386