码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
C - Minimum Inversion Number
DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of ....
分类:其他好文   时间:2014-05-05 11:42:13    阅读次数:276
【LeetCode】Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他好文   时间:2014-05-05 10:05:58    阅读次数:300
[LeetCode] 在一堆字符串中找出包含相同字符的 group的较快方法,题 Anagrams
题目:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.class Solution {public: vector ...
分类:其他好文   时间:2014-05-04 20:48:08    阅读次数:608
LeetCode: plusOne 题解
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:其他好文   时间:2014-05-04 19:46:18    阅读次数:372
线段数 --- (单点更新、求逆序对)
Minimum Inversion Number Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description The inversion number of a given number seque...
分类:其他好文   时间:2014-05-04 12:27:07    阅读次数:349
UVA 674 Coin Change
Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of mone...
分类:其他好文   时间:2014-05-04 12:00:00    阅读次数:363
pat 1038 Smallest Number解题心得
题目描述:1038. Recover the Smallest Number (30)Given a collection of number segments, you are supposed to recover the smallest number from them. For examp...
分类:其他好文   时间:2014-05-04 10:49:34    阅读次数:308
Distinct Subsequences
题目: Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from the original string by deleting some (c...
分类:其他好文   时间:2014-05-03 21:48:19    阅读次数:252
【LeetCode】Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:其他好文   时间:2014-05-03 21:35:49    阅读次数:310
POJ 1673 三角形垂心
EXOCENTER OF A TRIANGLE Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3209   Accepted: 1259 Description Given a triangle ABC, the Extriangles of ABC are cons...
分类:其他好文   时间:2014-05-03 21:14:28    阅读次数:340
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!