题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3450
Counting Sequences
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/65536 K (Java/Others)
Total Submission(s): 1815 Accepted Su...
分类:
其他好文 时间:
2014-09-25 18:29:17
阅读次数:
327
OS5.0以后就开始可以使用ARC( Automatic Reference Counting:自动引用计数 )来代替之前的MRC(Manual Reference Counting:人工引用计数)。使用ARC会减少很多代码和忘了释放对象的苦恼。但是事情都有两面性。使用了ARC之后如果你想复用以前写过的使用MRC的类, 就会出报错。这时候怎么办?方法比较简单, 只需要做下面的一个步骤就可以解决:
...
分类:
移动开发 时间:
2014-09-24 19:41:27
阅读次数:
236
题目信息:
1004. Counting Leaves (30)
时间限制
400 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
A family hierarchy is usually pre...
分类:
其他好文 时间:
2014-09-23 20:26:55
阅读次数:
205
最简单的DFS
Lake Counting
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 20516
Accepted: 10338
Description
Due to recent rains, water has pooled in various pla...
分类:
其他好文 时间:
2014-09-20 10:08:07
阅读次数:
259
题目:统计三角形个数。
分析:dp,数学公式。
递推公式:
正面:f[n] = f[n-1] + n*(n+1)/2 = f[n-1] + n*n/2 + n/2
=(n*(n+1)*(2*n+1)+3*n*(n+1))/12
反面:F[ n ]...
分类:
其他好文 时间:
2014-09-16 09:17:30
阅读次数:
149
'release' is unavailable: not available in automatic reference counting modeARC forbids explicit message send of'release''release' is unavailable: not...
分类:
其他好文 时间:
2014-09-13 20:07:45
阅读次数:
140
ARC forbids explicit message send of ‘release‘ ‘release‘ is unavailable: not available in automatic reference counting mode 今天,遇到了这么样的问题。 很显然,是ARC的问题。 错误原因:因为我们设置...
分类:
其他好文 时间:
2014-09-09 23:11:09
阅读次数:
920
基本回收算法 1. 引用计数(Reference Counting)比较古老的回收算法。原理是此对象有一个引用,即增加一个计数,删除一个引用则减少一个计数。垃圾回收时,只用收集计数为0的对象。此算法最致命的是无法处理循环引用的问题。2. 标记-清除(Mark-Sweep)此算法执行分两阶段。第一阶段...
分类:
其他好文 时间:
2014-09-09 10:36:38
阅读次数:
205
基数计数(cardinality counting)是实际应用中一种常见的计算场景,在数据分析、网络监控及数据库优化等领域都有相关需求。精确的基数计数算法由于种种原因,在面对大数据场景时往往力不从心,因此如何在误差可控的情况下对基数进行估计就显得十分重要。目前常见的基数估计算法有Linear Cou...
分类:
其他好文 时间:
2014-09-03 00:16:25
阅读次数:
332
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains ...
分类:
其他好文 时间:
2014-08-31 22:46:42
阅读次数:
354