标准库:一些最爱
集合、堆和双端队列
集合
集合Set类位于sets模块中。
>>> range(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> set(range(10))
set([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
集合是由序列(或其他可迭代的对象)构建的。主要用于检查成员资格,因此,副本是被忽略的:
>>> r...
分类:
编程语言 时间:
2014-07-02 08:44:12
阅读次数:
206
# Sets the target folders and the final framework product.
FMK_NAME=HovnVoipEngine
FMK_VERSION=1.0
# Install dir will be the final output to the framework.
# The following line creat...
分类:
移动开发 时间:
2014-07-01 15:36:58
阅读次数:
265
给出m条a年龄大于等于b的信息,要求可以比较的两个人不能放在同一组,问最少能分成几组。
由于是大于等于,所以原图可能构成强连通分量,意思就是有很多人年龄相同(想想也该知道,总共10w个人,肯定有很多人年龄重复= =!)将原图缩点后,对新图记忆化搜索求最长路。
如果不缩点,会RE。。。
#include
#include
#include
#include
#include
using na...
分类:
其他好文 时间:
2014-07-01 10:47:45
阅读次数:
269
http://www.flowsa.com/blog/entry/vacancy-senior-php-developer/Flow Communications is looking for a senior PHP developer to join our Johannesburg team....
分类:
Web程序 时间:
2014-06-27 18:51:49
阅读次数:
255
Cocos2d-x 脚本语言Lua基本数据结构-表(table) table是Lua中唯一的数据结构,其他语言所提供的数据结构,如:arrays、records、lists、queues、sets等,Lua都是通过table来实现,并且在lua中table很好的实现了这些数据结构。--摘自:《Programming in Lua》看以下代码,可以很清晰的明白Lua中表的使用:-- Lua中的表,t...
分类:
其他好文 时间:
2014-06-24 18:45:11
阅读次数:
258
Configure Oracle environment It is recommended that user sets the specific environment for Oracle installation in ~/.bash_profile file prior to instan...
分类:
数据库 时间:
2014-06-24 15:26:00
阅读次数:
611
利用R自带数据集通过data()函数可以查看R自带数据集。> data()返回以下结果,每一条记录都是一个数据,键入相应的数据名称可以查看具体信息。Data sets in package ¡®datasets¡¯:AirPassengers Monthly Airline ...
分类:
其他好文 时间:
2014-06-24 12:27:01
阅读次数:
193
在4.0.4 r1.2中查看android.widget.ImageView源代码可以发现,setImageBitmap()方法其实是调用了setImageDrawable()方法进行重绘。
Sets a Bitmap as the content of this ImageView.
Parameters:
bm The bitmap to set
@android...
分类:
其他好文 时间:
2014-06-22 19:31:16
阅读次数:
251
11488 - Hyper Prefix Sets
Time limit: 2.000 seconds
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int maxn = 5000000;
vector vs;
int cnt,ans...
分类:
其他好文 时间:
2014-06-22 16:38:22
阅读次数:
199
用tarjan进行缩点。
然后用dfs求最长路。水体。。。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 110000
vectorold[maxn];
vectorvec[maxn];
int dnf[maxn],low[maxn],instac...
分类:
其他好文 时间:
2014-06-22 11:51:01
阅读次数:
203