4Clojure上的一道题:[4Clojure 最长上升子序列算法][1] 描述如下: > Given a vector of integers, find the longest consecutive sub-sequence of increasing numbers. If two sub-sequences have the same le...
分类:
编程语言 时间:
2014-10-18 09:55:22
阅读次数:
259
Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,...
分类:
其他好文 时间:
2014-10-18 00:34:28
阅读次数:
178
Reduced ID Numbers
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 8989
Accepted: 3610
Description
T. Chur teaches various groups of students at university U. ...
分类:
其他好文 时间:
2014-10-17 23:28:04
阅读次数:
448
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.
Note: You can only move either down or right at...
分类:
其他好文 时间:
2014-10-17 23:26:43
阅读次数:
231
LCM Cardinality
Input: Standard Input
Output: Standard Output
Time Limit: 2 Seconds
A pair of numbers has a unique LCM but a single number can be the LCM of more than one possible pairs. For ex...
分类:
其他好文 时间:
2014-10-17 15:37:49
阅读次数:
260
全排列问题。常用的排列生成算法有序数法、字典序法、换位法(Johnson(Johnson-Trotter)、轮转法以及Shift cursor cursor* (Gao & Wang)法。
【题目】
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have...
分类:
其他好文 时间:
2014-10-16 23:05:23
阅读次数:
302
Round Numbers
Time Limit: 2000MS Memory Limit: 65536K
Total Submissions: 9149 Accepted: 3248
Description
The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Pa...
分类:
其他好文 时间:
2014-10-16 20:52:43
阅读次数:
198
Hashmat the Brave WarriorXX自己有士兵a人, 敌军有士兵b人,自己的士兵永远比敌军少, 求对方比自己多多少人。 (虽说要从头刷,但是这样的还是太水了吧 2333333喜闻乐见的错了因为2^32爆了int。。。These two numbers in each line...
分类:
其他好文 时间:
2014-10-16 20:04:33
阅读次数:
264
#include #include #include using namespace std;bool double_num(vector &num) { int carry = 0; int i = num.size() - 1; while (i>=0) { in...
分类:
其他好文 时间:
2014-10-16 16:06:22
阅读次数:
176
# if we list all natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6, and 9. The sum of these multiples is 23. Find the sum of all t...
分类:
编程语言 时间:
2014-10-15 23:39:21
阅读次数:
221