poj 2386 Lake Counting 【题意】: 有一个大小为N×M的园子。雨后积起了水。八连通的积水被觉得是连接在一起的。请求出园子里总共同拥有多少水洼?(八连通指的是下图中相对W 的*的部分) Sample Input 10 12 W........WW. .WWW.....WWW .. ...
分类:
其他好文 时间:
2017-05-04 22:00:10
阅读次数:
263
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 ...
分类:
其他好文 时间:
2017-05-01 00:23:56
阅读次数:
123
https://leetcode.com/problems/counting-bits/#/description ...
分类:
其他好文 时间:
2017-04-30 01:11:09
阅读次数:
205
来源:http://m.blog.csdn.net/article/details?id=70861055 Trung is bored with his mathematicshomeworks. He takes a piece of chalk and starts writing a seq ...
分类:
其他好文 时间:
2017-04-27 23:06:29
阅读次数:
242
可以从不同的的角度去划分垃圾回收算法: 按照基本回收策略分 引用计数(Reference Counting): 比较古老的回收算法。原理是此对象有一个引用,即增加一个计数,删除一个引用则减少一个计数。垃圾回收时,只用收集计数为0的对象。此算法最致命的是无法处理循环引用的问题。 标记-清除(Mark- ...
分类:
编程语言 时间:
2017-04-27 12:43:54
阅读次数:
132
Lake Counting(POJ No.2386) Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a recta ...
分类:
其他好文 时间:
2017-04-26 21:32:48
阅读次数:
128
贪心加树状数组 给出的数据可能出现两种情况,包括与不包括,但我们从右向左删就能避免这个问题。 #include<stdio.h> #include<string.h> #include<iostream> using namespace std; const int maxn=200010; int ...
分类:
其他好文 时间:
2017-04-26 18:12:51
阅读次数:
173
Python GC主要运用了“引用计数”(reference counting)来跟踪和回收垃圾。在引用计数的基础上,通过“标记-清除”(mark and sweep)解决容器对象可能产生的循环引用的问题。通过“分代回收”(generation collection)以空间换取时间来提高垃圾回收效率 ...
分类:
编程语言 时间:
2017-04-25 21:35:43
阅读次数:
243
/** 题目:UVA 1640 The Counting Problem UVA1640 链接:https://vjudge.net/problem/UVA-1640 题意:求[a,b]或者[b,a]区间内0~9在里面各个数的数位上出现的总次数。 思路:数位dp; dp[leadzero][i][j... ...
分类:
其他好文 时间:
2017-04-25 15:08:36
阅读次数:
156
E - Counting Cliques http://blog.csdn.net/eventqueue/article/details/52973747 http://blog.csdn.net/yuanjunlai141/article/details/52972715 1 #include<i ...
分类:
编程语言 时间:
2017-04-23 19:27:12
阅读次数:
196