码迷,mamicode.com
首页 >  
搜索关键字:can    ( 23056个结果
Sliding Window Maximum
问题描述Given an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumb...
分类:Windows程序   时间:2015-07-19 11:32:30    阅读次数:300
设计模式_建造者模式
Builder Pattern  Separate the construction of a complex object from its representation so that the same construction process can create different representations.     将一个复杂对象的构建与它的表示分离,使得同样的构造过程可以创建...
分类:其他好文   时间:2015-07-19 10:18:18    阅读次数:109
[LeetCode][JavaScript]Sliding Window Maximum
Sliding Window MaximumGiven an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can...
分类:编程语言   时间:2015-07-18 22:42:08    阅读次数:555
Project Euler:Problem 76 Counting summations
It is possible to write five as a sum in exactly six different ways: 4 + 1 3 + 2 3 + 1 + 1 2 + 2 + 1 2 + 1 + 1 + 1 1 + 1 + 1 + 1 + 1 How many different ways can one hundred be written as a su...
分类:其他好文   时间:2015-07-18 18:41:52    阅读次数:94
Project Euler:Problem 77 Prime summations
It is possible to write ten as the sum of primes in exactly five different ways: 7 + 3 5 + 5 5 + 3 + 2 3 + 3 + 2 + 2 2 + 2 + 2 + 2 + 2 What is the first value which can be written as the sum o...
分类:其他好文   时间:2015-07-18 18:40:05    阅读次数:118
Leetcode 239 Sliding Window Maximum
Given an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbers ...
分类:Windows程序   时间:2015-07-18 18:29:53    阅读次数:135
思维题 URAL 1409 Two Gangsters
题目传送门 1 /* 2 思维题:注意题目一句话:At some moment it happened so that they shot one and the same can. 3 如果两个人都有射中的话,肯定一个can同时被打中 4 */ 5 #includ...
分类:其他好文   时间:2015-07-18 18:15:05    阅读次数:126
POJ - 1691 Painting A Board (状态压缩 + 暴力)
题目大意:要将一个大矩形內的所有小矩形涂色,涂色要求,只有该矩形上面的所有矩形都涂色了才可以涂该颜色,换一种填涂的颜色就要花费一点体力值,问填涂完需要花费的最小体力值解题思路:先处理一下填涂该矩形的前提条件,我用了一个can数组表示填涂该矩形时要满足的状态量 用dp[color][state]表示当前用的颜色是color,填涂的状态为state时所用的最少体力值 然后暴力得出转换和结果#incl...
分类:其他好文   时间:2015-07-18 17:06:05    阅读次数:143
hdu 1503, LCS variants, find a LCS, not just the length, backtrack to find LCS, no extra markup
a typical variant of LCS algo. the key point here is, the dp[][] array contains enough message to determine the LCS, not only the length, but all of LCS candidates, we can backtrack to find all of LCS....
分类:其他好文   时间:2015-07-18 17:03:05    阅读次数:132
Sliding Window Maximum
from?https://leetcode.com/problems/sliding-window-maximum/ Given an array?nums, there is a sliding window of size?k?which is moving from the very left of the array to the very right. You can on...
分类:Windows程序   时间:2015-07-18 15:44:49    阅读次数:391
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!