莫比乌斯反演 ? 对于两个定义域为非负整数的函数$F(n)$和$f(n)$ ? 若满足:$F(n)=\sum\limits_{d|n}f(d)$,则反演得到$f(n)=\sum\limits_{d|n}\mu(d)F(\frac n d)$; $$ \sum_{d\mid n}\mu(d)F(\fr ...
分类:
其他好文 时间:
2018-01-06 15:56:09
阅读次数:
186
>>> L = [1,2,3]>>> [x**2 for x in L][1, 4, 9]>>> next(L)Traceback (most recent call last): File "<stdin>", line 1, in <module>TypeError: 'list' object ...
分类:
编程语言 时间:
2018-01-04 23:31:41
阅读次数:
318
一 简介 sdtin, stdout, stderr分别称为标准输入,标准输出,标准错误输出, 它们的声明如下: /* Standard streams. */extern FILE *stdin; /* Standard input stream. */extern FILE *stdout; / ...
分类:
系统相关 时间:
2018-01-04 19:33:13
阅读次数:
413
const rl = readline.createInterface({ input: process.stdin, output: process.stdout, prompt: '请输入> '});rl.prompt();rl.on('line', function (line){ switc ...
分类:
其他好文 时间:
2018-01-03 16:05:43
阅读次数:
121
2.1 B 君的四分之一 (viertel)【题目背景】因为晚上 B 君不在,B 君决定出?个昨天讲过的题?。【题目描述】回忆 ProjectEuler 258 的做法,我们对其通项做出如下修改。fn = 1(0 ≤ n < k) fn = ∑ 1≤i≤k fn?i (n ≥ k) 为了让?家写起来 ...
分类:
其他好文 时间:
2018-01-02 23:18:44
阅读次数:
127
转载自:http://dos2unix.cn/link/480 1. 标准输入stdin文件描述符为0,标准输出stdout文件描述符为1,标准错误stderr文件描述符为2 2. /dev/null 空设备,相当于垃圾桶 3. 重定向符号:> 3. 2>1 与 2>&1 的区别 2>1, 把标准错 ...
分类:
系统相关 时间:
2018-01-02 16:50:56
阅读次数:
205
Linux多进程CS服务器简单实现 server端 多进程实现多用户连接,即每个用户一个连接,这里仍然用server将收到的字符串转大写后返回给客户端。 代码实现 测试结果 可以实现多个客户端同时连接服务器,服务器每接受一个客户就创建一个子进程,用户端断开后,进程由父进程自动回收子进程。 存在问题 ...
分类:
系统相关 时间:
2018-01-02 01:24:57
阅读次数:
239
Python3.x:生成器简介 概念 任何使用yield的函数都称之为生成器;使用yield,可以让函数生成一个序列,该函数返回的对象类型是"generator",通过该对象连续调用__next__()方法返回序列值; 实例 生成器函数只有在调用__next()__方法的时候才开始执行函数里面的语句 ...
分类:
编程语言 时间:
2018-01-01 22:02:25
阅读次数:
266
Description http://www.lydsy.com/JudgeOnline/upload/zjoi2012.pdf http://www.lydsy.com/JudgeOnline/upload/zjoi2012.pdf 正解:$link-cut \ tree$。 $LCT$板子题,直 ...
分类:
其他好文 时间:
2017-12-31 21:05:59
阅读次数:
167