码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
均值定义及实例
def Mean(t): """均值""" return float(sum(t)) / len(t)
分类:其他好文   时间:2014-07-15 00:09:49    阅读次数:516
分别利用并查集,DFS和BFS方法求联通块的数量
联通块是指给定n个点,输入a,b(1#includeusing namespace std;const int maxn=1010;int p[maxn];//作为每个独立的点 int sum[maxn];//每个节点下面连接的点 int find(int x) {if(x==p[x])return...
分类:移动开发   时间:2014-07-14 22:21:30    阅读次数:403
UVAlive4255_Guess
题目很好很有意思。告诉你n个序列中,任意一个连续子序列的和与0相比较的结果。构造一个满足条件的序列。对于从x->y这一段的和,如果大于0,那么sum[x]>sum[y-1],显然我们可以得到每一个sum的大小关系。由于这个满足条件的sum关系已经考虑了所有的源系列的大小关系,所以只要我们生成了一个满...
分类:其他好文   时间:2014-07-14 18:00:24    阅读次数:193
Poj3414广搜
/* D - D Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3414 Description You are given two pots, having the volume of A and B liters resp...
分类:其他好文   时间:2014-07-14 17:16:04    阅读次数:271
Architectures for concurrent graphics processing operations
BACKGROUND1. FieldThe present invention generally relates to rendering two-dimension representations from three-dimensional scenes, and more particula...
分类:其他好文   时间:2014-07-14 14:39:07    阅读次数:278
DYNAMIC CONTEXT SWITCHING BETWEEN ARCHITECTURALLY DISTINCT GRAPHICS PROCESSORS
FIELD OF INVENTIONThis invention relates to computer graphics processing, and more specifically to computer graphics processing using two or more arch...
分类:其他好文   时间:2014-07-14 14:21:10    阅读次数:272
NSum小结
本文载自【k sum problem】以及【NSum】有位同僚,对该问题做出了代码的小结,想看吗?戳我戳我。问题陈述:在一个数组,从中找出k个数(每个数不能重复取。数组中同一个值有多个,可以取多个),使得和为零。找出所有这样的组合,要求没有重复项(只要值不同即可,不要求在原数组中的index不同)解...
分类:其他好文   时间:2014-07-14 14:16:00    阅读次数:219
[ACM] POJ 1753 Flip Game (枚举,BFS,位运算)
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 29921   Accepted: 12975 Description Flip game is played on a rectangular 4x4 field with two-sided...
分类:其他好文   时间:2014-07-14 12:46:46    阅读次数:229
Mysql数据库大小查询
1、进入information_schema数据库(存放了其他的数据库的信息)useinformation_schema;2、查询所有数据的大小:SELECTconcat(round(sum(DATA_LENGTH/1024/1024),2),’MB’)asdataFROMTABLES;3、查看指定数据库的大小:比如查看数据库hellodb的大小SELECTconcat(round(sum(DATA_..
分类:数据库   时间:2014-07-14 11:39:30    阅读次数:253
[leetcode]Combination SumII
Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sum...
分类:其他好文   时间:2014-07-14 10:42:22    阅读次数:192
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!