codeforces Epic Game 题解

Simon and Antisimon play a game. Initially each player receives one fixed positive integer that doesn't change throughout the game. Simon recei...

2014-04-30 07:16:00

阅读数 52

评论数 0

Codeforces Helpful Maths

Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. The tea...

2014-04-30 07:11:00

阅读数 35

评论数 0

Unique Binary Search Trees -- LeetCode

原题链接:http://oj.leetcode.com/problems/unique-binary-search-trees/这道题要求可行的二叉查找树的数量,其实二叉查找树可以任意取根,只要满足中序遍历有序的要求就可以。从处理子问题的角度来看,选取一个结点为根,就把结点切成左右子树,以这个结点...

2014-04-30 06:16:00

阅读数 33

评论数 0

Unique Binary Search Trees II -- LeetCode

原题链接:http://oj.leetcode.com/problems/unique-binary-search-trees-ii/这道题是求解所有可行的二叉查找树,从Unique Binary Search Trees中我们已经知道,可行的二叉查找树的数量是相应的卡特兰数,不是一个多项式时...

2014-04-30 06:15:00

阅读数 25

评论数 0

【图像处理】Gabor滤波器

Gabor的核函数参考的wiki 使用实数Real的公式计算核函数代码: Mat gaborFilter(Mat& img, Mat& filter){ int half_filter_size = (max(filter.rows,filte...

2014-04-30 00:36:00

阅读数 45

评论数 0

Codeforces A. Double Cola 题解

题目很奇怪,就是5个人排队喝可乐,喝完之后编程两个人,然后拍在队后面,然后继续喝可乐。 给出个数值,代表第几罐可乐,问会是第几个人喝到? http://codeforces.com/problemset/problem/82/A 一个数学问题,仔细点就好了。 要熟练的知识点: 1...

2014-04-29 18:16:00

阅读数 31

评论数 0

Timus 1119. Metro 动态规划

Many of SKB Kontur programmers like to get to work by Metro because the main office is situated quite close the station Uralmash. So, since a sed...

2014-04-29 15:05:00

阅读数 19

评论数 0

Timus 1104. Don’t Ask Woman about Her Age题解

Mrs Little likes digits most of all. Every year she tries to make the best number of the year. She tries to become more and more intelligent and ...

2014-04-29 12:27:00

阅读数 20

评论数 0

Timus 1446. Sorting Hat 分类问题

At the start of each school year, a very important event happens at Hogwarts. Each of the first-year wizards and witches is assigned to one of th...

2014-04-29 09:31:00

阅读数 24

评论数 0

Timus 1777. Anindilyakwa 奇怪的数数问题

The language of Australian aborigines anindilyakwa has no numerals. No anindilyakwa can say: “I've hooked eight fishes”. Instead, he says: “I...

2014-04-29 08:43:00

阅读数 35

评论数 0

Restore IP Addresses -- LeetCode

原题链接:http://oj.leetcode.com/problems/restore-ip-addresses/这道题的解法非常接近于NP问题,也是采用递归的解法。基本思路就是取出一个合法的数字,作为IP地址的一项,然后递归处理剩下的项。可以想象出一颗树,每个结点有三个可能的分支(因为范围是0...

2014-04-29 05:01:00

阅读数 18

评论数 0

Interleaving String -- LeetCode

原题链接:http://oj.leetcode.com/problems/interleaving-string/这是一道关于字符串操作的题目,要求是判断一个字符串能不能由两个字符串按照他们自己的顺序,每次挑取两个串中的一个字符来构造出来。像这种判断能否按照某种规则来完成求是否或者某个量的题目,很...

2014-04-29 04:28:00

阅读数 19

评论数 0

Timus 1644. A Whole Lot of Walnuts 算法

Ten big walnuts is a whole lot of walnuts, that's for sure! Two walnuts is too little for anybody. How about six walnuts? Is it a small number of...

2014-04-28 19:26:00

阅读数 18

评论数 0

Timus 1510. Order 找到出现次数过半的数

A New Russian Kolyan likes two things: money and order. Kolyan has lots of money, but there is no order in it. One beautiful morning Kolyan under...

2014-04-28 18:19:00

阅读数 21

评论数 0

Timus 1161. Stripies

Our chemical biologists have invented a new very useful form of life calledstripies(in fact, they were first called in Russian -polosatiki, but the...

2014-04-28 16:08:00

阅读数 26

评论数 0

Timus 1642. 1D Maze迷宫

1D people lived in a 1D country. Everything in the country was one-dimensional, and everything was simple and clear: just one axis and two direct...

2014-04-28 15:28:00

阅读数 26

评论数 0

Timus 2002. Test Task 一个登陆系统

It was an ordinary grim October morning. The sky was covered by heavy gray clouds. It was a little rainy. The rain drops fell on the windows with...

2014-04-28 15:04:00

阅读数 22

评论数 0

Timus 1601. AntiCAPS 修正大写句子

The blonde Angela has a new whim: internet chats. Of course, as any blonde, she writes her messages using the upper case. You are the moderator o...

2014-04-28 14:59:00

阅读数 29

评论数 0

Timus 1180. Stone Game 游戏题目

Two Nikifors play a funny game. There is a heap ofNstones in front of them. Both Nikifors in turns take some stones from the heap. One may take a...

2014-04-28 09:02:00

阅读数 20

评论数 0

Timus 1796. Amusement Park 聪明题

On a sunny Sunday, a group of children headed by their teacher came to an amusement park. Aunt Frosya, who was a very kind and quiet person, work...

2014-04-28 07:52:00

阅读数 22

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭