2017年7月14日

摘要: 把只包含因子2、3和5的数称作丑数(Ugly Number)。例如6、8都是丑数,但14不是,因为它包含因子7。 习惯上我们把1当做是第一个丑数。求按从小到大的顺序的第N个丑数。 代码如下: 阅读全文
posted @ 2017-07-14 15:24 烁宝宝 阅读(105) 评论(0) 推荐(0)

2017年3月2日

摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2017-03-02 17:02 烁宝宝 阅读(121) 评论(0) 推荐(0)
 
摘要: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space 阅读全文
posted @ 2017-03-02 16:46 烁宝宝 阅读(94) 评论(0) 推荐(0)
 
摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2017-03-02 14:31 烁宝宝 阅读(116) 评论(0) 推荐(0)

2017年3月1日

摘要: Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so tha 阅读全文
posted @ 2017-03-01 11:00 烁宝宝 阅读(117) 评论(0) 推荐(0)

2017年2月28日

摘要: In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, suppose you are a domin 阅读全文
posted @ 2017-02-28 20:05 烁宝宝 阅读(137) 评论(0) 推荐(0)
 
摘要: Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t 阅读全文
posted @ 2017-02-28 11:09 烁宝宝 阅读(149) 评论(0) 推荐(0)

2016年12月21日

摘要: Run Run Configurations Common Encoding Other GBK Run Configurations里的Common中将编码方式改成GBK就正常了 阅读全文
posted @ 2016-12-21 20:39 烁宝宝 阅读(587) 评论(0) 推荐(0)

2016年12月12日

摘要: 1 # -*- coding: utf-8 -*- 2 """ 3 Created on Mon Dec 12 14:35:49 2016 4 5 @author: yaru 6 """ 7 8 targetURL = "http://pythonscraping.com" 9 #targetURL = "https://github.com/" 10 11 from s... 阅读全文
posted @ 2016-12-12 14:51 烁宝宝 阅读(975) 评论(0) 推荐(0)

2016年12月7日

摘要: 到http://download.csdn.net/detail/wanghui2008123/7621567下载中文简体包 然后找到tessdata目录,把eng.traineddata替换为chi_sim.traineddata,并且把chi_sim.traineddata重命名为eng.tra 阅读全文
posted @ 2016-12-07 19:28 烁宝宝 阅读(1449) 评论(1) 推荐(1)