原创链接: http://106.13.73.98/__/186/ Python的 模块主要运用了 引用计数 (reference counting)来跟踪和回收垃圾。在引用计数的基础上,还可以通过 标记 清除(mark and sweep)解决容器对象可能产生的循环引用问题。通过 分代回收(gen ...
分类:
编程语言 时间:
2019-08-06 15:34:43
阅读次数:
109
-->Lake Counting 直接上中文了 Descriptions: 由于近日阴雨连天,约翰的农场中中积水汇聚成一个个不同的池塘,农场可以用 N x M (1 <= N <= 100; 1 <= M <= 100) 的正方形来表示。农场中的每个格子可以用'W'或者是'.'来分别代表积水或者土地 ...
分类:
其他好文 时间:
2019-07-10 21:38:21
阅读次数:
142
模拟的时候切掉的,感觉这道题还是很好的。(虽然T1期望啥也不会积分瞎搞拿了个二十五分,T2好不容易搞了个字符串dp,最后数组还开小了……不过终于狗进前五) 题面描述: 构建一个N个点的有向图G,初始没有任何边。接下来构建一个长度为E的边的序列A,序列中每条边都是满足1≤s,t≤N且s≠t的有向边(s ...
分类:
其他好文 时间:
2019-07-02 21:29:36
阅读次数:
129
--》 git push Counting objects: 81, done.Delta compression using up to 4 threads.Compressing objects: 100% (50/50), done.^Citing objects: 64% (52/81), ...
分类:
其他好文 时间:
2019-06-17 11:12:18
阅读次数:
181
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp ...
分类:
其他好文 时间:
2019-05-25 13:17:50
阅读次数:
111
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 representation and r ...
分类:
其他好文 时间:
2019-05-24 14:13:34
阅读次数:
85
Boring counting $$ Time Limit: 1000 ms \quad Memory Limit: 32768 kB $$ 题意 给出一个字符串,求出其中出现两次及以上的子串个数,要求子串之间不可以重合。 思路 对字符串后缀数组,然后枚举子串长度 $len$,若某一段连续的 $sa ...
分类:
编程语言 时间:
2019-05-24 01:05:23
阅读次数:
112
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp ...
分类:
其他好文 时间:
2019-05-20 21:27:17
阅读次数:
164
样例一 __输入__ 4 1 4 3 2 __输出__ 3 样例二 __输入__ 5 9 1 0 0 5 __输出__ 8 题解 这是本人自己想了2个半小时才想出来的方法,~~稍稍有点复杂~~但是很好理解 题目的意思就是给定一个数组,求有多少个数字不同的顺序对和逆序对(SaSd) 那么总方案数应该就 ...
分类:
其他好文 时间:
2019-05-12 14:09:44
阅读次数:
135
引用计数(Reference Counting) 循环引用问题 标记清除(Mark and Sweep) 内存池(Memory Pools) Eden 是内存中的一个区域, 用来分配新创建的对象 。存活区(Survivor Spaces)Eden 区的旁边是两个存活区, 称为 from 空间 和 ...
分类:
其他好文 时间:
2019-05-08 23:02:20
阅读次数:
137