随笔分类 - 算法相关
摘要:简单的算法题, Find Minimum in Rotated Sorted Array 的Python实现。题目:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6...
阅读全文
摘要:Topcoder上的一道题目,题目描述如下:Problem StatementByteland is a city with many skyscrapers, so it's a perfect venue for BASE jumping. Danilo is an enthusiastic B...
阅读全文
摘要:题目:http://acm.hrbeu.edu.cn/index.php?act=problem&id=1005&cid=18Description大家都玩过连连看吧!今天我们玩一个类似的游戏。在一个由10*10个小方格组成的矩形里有n(n#include #include #include #in...
阅读全文
摘要:题目(Topcoder锦标赛187 250题):Problem Statement +---+ | D |+---+---+---+---+| E | A | B | F |+---+---+---+---+ | C | +---+The ASCII art above sh...
阅读全文
摘要:题目:Consider an infinite square grid. Each square in the grid can be represented by a pair of integer coordinates that specify its row and column.We wi...
阅读全文
摘要:题目:Problem StatementYou are given a bidirectional cyclical queue which contains N elements. You need to extract several elements from this queue. You ...
阅读全文
摘要:题目:In the attic of your house you found an M×N board, divided into MN unit squares. Some of the squares are black and the others are white. You decide...
阅读全文