poj 2386 Lake Counting 【题意】: 有一个大小为N×M的园子,雨后积起了水。八连通的积水被觉得是连接在一起的。请求出园子里总共同拥有多少水洼?(八连通指的是下图中相对W 的*的部分) Sample Input 10 12 W........WW. .WWW.....WWW .. ...
分类:
其他好文 时间:
2017-05-26 10:55:19
阅读次数:
281
题意: 给定$a,b,c$ ,求解满足 $1 \leq m \leq b, 1 \leq n \leq c, a | mn$ 的 $(m,n)$ 数对个数。 $a \leq INTMAX$, $b \leq LONGLONGMAX$ 解法 原问题相当于求解 $mn \ mod \ a \equiv ...
分类:
其他好文 时间:
2017-05-24 21:08:03
阅读次数:
129
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-19 11:13:54
阅读次数:
144
1.引用计数法(Reference Counting Collector) 1.1算法分析 引用计数是垃圾收集器中的早期策略。在这种方法中,堆中每个对象实例都有一个引用计数。当一个对象被创建时,且将该对象实例分配给一个变量,该变量计数设置为1。当任何其它变量被赋值为这个对象的引用时,计数加1(a = ...
分类:
编程语言 时间:
2017-05-18 22:14:56
阅读次数:
288
Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 34735 Accepted: 17246 Description Due to recent rains, water has pooled in va ...
分类:
其他好文 时间:
2017-05-17 19:13:23
阅读次数:
254
[Spoj]Counting Divisors (cube) ...
分类:
其他好文 时间:
2017-05-14 00:51:25
阅读次数:
218
http://blog.csdn.net/highacm/article/details/8629173 题目大意:计算从1,2,3,...,n中选出3个不同的整数,使得以它们为边长可以构成三角形的个数。 思路:用一般的方法需要三重循环,时间复杂度为O(n^3),肯定超时,因此可用数学的方法对问题进 ...
分类:
其他好文 时间:
2017-05-13 09:51:57
阅读次数:
149
Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there ar ...
分类:
其他好文 时间:
2017-05-10 22:24:02
阅读次数:
284
原文地址:http://www.cnblogs.com/GXZlegend/p/6832263.html 题目描述 The cows have once again tried to form a startup company, failing to remember from past expe ...
分类:
编程语言 时间:
2017-05-09 20:37:30
阅读次数:
440
GitHub已然是全球最流行的开源项目托管平台,项目数量眼下已经达到了千万级别。Adereth在Counting Stars on GitHub一文提供了一个很有意思的思路,那就是籍GitHub用户通过星星标记感兴趣项目的数目。来观察GitHub中用户最流行的是什么编程语言。 老规矩,让我们用Pow ...
分类:
编程语言 时间:
2017-05-07 16:45:05
阅读次数:
202