greenlet已经实现了协程,但是这个还的人工切换,是不是觉得太麻烦了,不要捉急,python还有一个比greenlet更强大的并且能够自动切换任务的模块gevent 其原理是当一个greenlet遇到IO(指的是input output 输入输出,比如网络、文件操作等)操作时,比如访问网络,就自 ...
分类:
其他好文 时间:
2018-06-24 10:29:13
阅读次数:
156
C. Alphabetic Removals time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a s ...
分类:
其他好文 时间:
2018-06-23 13:24:47
阅读次数:
184
A. Check the string time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A has a string consis ...
分类:
其他好文 时间:
2018-06-22 21:44:45
阅读次数:
182
Problem G. Colors Overflow Input file: standard input Output file: standard output Balloon Color: Dark Green If there is one thing Ziad is good at, it ...
分类:
其他好文 时间:
2018-06-22 20:32:23
阅读次数:
278
1、什么是iptables iptables是基于软件的形式实现的一种防火墙的软件工具,主要工作于主机边缘,只能对一台主机起到保护作用。 2、iptables的四表五链 四表:filter、nat、mangle(做防火墙标记)、raw 五链:INPUT、OUTPUT、FORWARD、PREROUTI ...
分类:
其他好文 时间:
2018-06-21 19:48:12
阅读次数:
222
4837: Poj1151 Atlantis Description 给定平面直角坐标系中的N个矩形,求它们的面积并,即这些矩形的并集在坐标系中覆盖的总面积,如下图所示。 给定平面直角坐标系中的N个矩形,求它们的面积并,即这些矩形的并集在坐标系中覆盖的总面积,如下图所示。 Input Output ...
分类:
其他好文 时间:
2018-06-20 22:43:43
阅读次数:
210
传送门 题目 Input Output 分析 看到这个题不难想到倍增LCA,然后我们考虑如何计算。我们分别求出3个点中任意两点的LCA,为了走的步数最少所以肯定是先有两个点相遇然后另一个点走的它们相遇的点,至于最后的距离自己画一画就知道啦。 代码 ...
分类:
其他好文 时间:
2018-06-20 21:36:01
阅读次数:
189
Knights of a Polygonal Table time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Knights of a ...
分类:
其他好文 时间:
2018-06-20 18:55:45
阅读次数:
211
传送门 Description Input Output Sample Input Sample Output Hint Solution 非常显然的并查集题目,在本题中,对于每个罪犯i,维护两个信息:必须要和他关在一起的罪犯的集合,以及和他有仇的罪犯的集合,由于监狱只有两个,所以和他有仇的罪犯一定 ...
分类:
其他好文 时间:
2018-06-19 21:30:41
阅读次数:
173
C. Drazil and Factorial time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Drazil is playin ...
分类:
其他好文 时间:
2018-06-18 19:57:06
阅读次数:
168