点击打开链接
6525 - Attacking rooks
Chess inspired problems are a common source of exercises in algorithms classes. Starting with the well
known 8-queens problem, several generalizations and variatio...
分类:
其他好文 时间:
2014-05-07 08:51:26
阅读次数:
428
In this problem you will perform median filtering to enhance the quality of a noise corrupted
image. Recall from the video lecture that median filtering is effective for removing "salt-and-pepper" n...
分类:
其他好文 时间:
2014-05-07 07:20:09
阅读次数:
326
一卡通大冒险
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): Accepted Submission(s):
Problem Description
因为长期钻研算法, 无暇顾及个人问题,BUAA ACM/ICP...
分类:
其他好文 时间:
2014-05-07 06:44:34
阅读次数:
351
题目链接:http://poj.org/problem?id=3041
Asteroids
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 14022
Accepted: 7629
Description
Bessie wants to...
分类:
其他好文 时间:
2014-05-07 05:59:05
阅读次数:
366
[Question]
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to t...
分类:
其他好文 时间:
2014-05-07 05:37:44
阅读次数:
278
来源:点击打开链接
可以模拟过,不过练习这个题的目的是学习stl中的bitset,一个神奇的二进制容器.
和vector/MAP等容器一样,bitset具备stl库函数的几乎所有特性,同时加入了一些自己的东西,对二进制处理十分便利,尤其是在找零和找一的方面.
ps:遍历的话,bitset默认是从后往前遍历的.所以不要自己再倒过来了.
一些库函数及用法的实例:
典型的bitset初...
分类:
其他好文 时间:
2014-05-07 04:36:52
阅读次数:
331
SD五一赛中也出了这个问题。
来源:点击打开链接
改成了多组样例。
思路还是很简单的。给出一个最大长和宽,还有推荐比例,求解符合比例的图形中面积最大的情况。这样的话,先对比例进行约分。然后根据比例式的性质,交叉相乘比一下大小,在思维不混乱的情况下,可以看出比例长度大于实际长度的时候,合法结果不存在。y:比例y>x:比例x的时候,保留X部分为最大值,反之保留Y的宽度为最大值。
思维不要乱。
...
分类:
其他好文 时间:
2014-05-07 04:17:57
阅读次数:
294
Count the string
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4212 Accepted Submission(s): 1962
Problem Description
It is wel...
分类:
其他好文 时间:
2014-05-06 15:27:24
阅读次数:
306
NYOJ 640 Geometric Sum...
分类:
其他好文 时间:
2014-05-06 15:20:32
阅读次数:
229
【Question】
Given an array S of n integers, are there elements a, b, c in S such
that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
Elements in ...
分类:
其他好文 时间:
2014-05-06 14:57:29
阅读次数:
318