Reference: https://docs.python.org/2/library/collections.html namedtuple() factory function for creating tuple subclasses with named fields deque list ...
分类:
编程语言 时间:
2016-09-17 21:43:18
阅读次数:
126
http://docs.spring.io/spring-boot/docs/current/api/overview-summary.html http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#auto-con ...
分类:
编程语言 时间:
2016-09-17 19:06:57
阅读次数:
1457
一个长度为N的正整数数组A,给出一个数K以及Q个查询,每个查询包含2个数l和r,对于每个查询输出从A[i]到A[j]中,有多少对数,abs(A[i] - A[j]) <= K(abs表示绝对值)。 Input Output ...
分类:
其他好文 时间:
2016-09-17 12:08:04
阅读次数:
310
bzoj4397[Usaco2015 dec]Breed Counting 题意: 给定一个长度为N的序列,每个位置上的数只可能是1,2,3中的一种。有Q次询问,每次给定两个数a,b,请分别输出区间[a,b]里数字1,2,3的个数。n≤100000,q≤100000。 题解: 裸前缀和。 代码: 2 ...
分类:
其他好文 时间:
2016-09-16 11:30:47
阅读次数:
152
1. Weak references: In computer programming, a weak reference is a reference that does not protect the referenced object from collection by a garbage ...
分类:
编程语言 时间:
2016-09-16 08:59:28
阅读次数:
235
1. Counting Bits Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary rep ...
分类:
其他好文 时间:
2016-09-16 07:51:56
阅读次数:
148
Ant Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4982 Accepted: 1896 Description Bessie was poking around the ant hill one day ...
分类:
其他好文 时间:
2016-09-15 17:49:45
阅读次数:
184
In C#, out keyword 是argument传值变成passed by reference. out keyword 在同时返回多个值时很有用. 与ref keyword 相似. 若是使用out keyword传argument, 那么在method 的definition 和 使用时都 ...
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5439 题意:按规则构造一个数列a a(1)=1 a(2)=2 a(2)=2 > 写两个2 > a()={1 2 2} a(3)=2 > 写两个3 > a()={1 2 2 3 3} a(4)=3 >写三个4 ...
分类:
其他好文 时间:
2016-09-13 23:56:53
阅读次数:
166
1. 关于C++中的const int** foo的含义 reference : stackoverfolw。 2. C++中的底层const与顶层const 使得被修饰的变量本身无法改变的const是顶层const,其他的通过指针或引用等间接途径来限制目标内容不可变的const是底层const。 ...
分类:
其他好文 时间:
2016-09-13 23:53:38
阅读次数:
151