码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
【LeetCode】Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:其他好文   时间:2014-05-10 20:06:26    阅读次数:404
HDU 3308 LCIS(线段树)
Problem DescriptionGiven n integers.You have two operations:U A B: replace the Ath number by B. (index counting from 0)Q A B: output the length of the...
分类:其他好文   时间:2014-05-06 01:20:33    阅读次数:332
[leetcode] Best Time to Buy and Sell Stock II
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-06 00:51:29    阅读次数:353
HDU 4718 The LCIS on the Tree(树链剖分)
Problem DescriptionFor a sequence S1, S2, ... , SN, and a pair of integers (i, j), if 1 2 #include 3 #include 4 #include 5 using namespace std...
分类:其他好文   时间:2014-05-05 23:50:08    阅读次数:445
Leetcode | Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest...
分类:其他好文   时间:2014-05-05 23:01:41    阅读次数:374
UVA之537 - Artificial Intelligence?
Artificial Intelligence?  Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and underst...
分类:其他好文   时间:2014-05-02 23:39:35    阅读次数:485
[数据结构暴力] zoj 3749 Chameleon
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3749 Chameleon Time Limit: 6 Seconds      Memory Limit: 65536 KB Given n groups of integers(all the integers are distin...
分类:其他好文   时间:2014-05-02 19:06:34    阅读次数:447
leetcode: Subsets & Subsets II
SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must...
分类:其他好文   时间:2014-05-02 16:39:15    阅读次数:315
UVA 之10010 - Where's Waldorf?
Where's Waldorf?  Given a m by n grid of letters, ( ), and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line o...
分类:其他好文   时间:2014-05-02 10:59:15    阅读次数:514
leetcode: Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2014-05-02 10:41:53    阅读次数:267
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!