Where is the Marble?
Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after ano...
分类:
其他好文 时间:
2014-08-11 17:53:02
阅读次数:
291
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have
the following unique permutations:
[1,1,2], [1,2,1],
and [2,1...
分类:
其他好文 时间:
2014-08-11 17:49:32
阅读次数:
201
f (0) = 0 and f (1) = 1f (i+2) = f (i+1) + f (i) for every i ≥ 0
Sample input
three integers a,b,n where
0 ≤ a,b 64 (a and b will
not both be zero) and 1 ≤ n ≤ 1000.
T
a b n
...
分类:
其他好文 时间:
2014-08-11 12:02:42
阅读次数:
220
Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of...
分类:
其他好文 时间:
2014-08-11 11:52:02
阅读次数:
197
import osimport sysimport structdef enc(path, key): path_ret = "" for i in range(0, len(path)/4): path_ret += struct.pack(">> ===========...
分类:
编程语言 时间:
2014-08-11 11:27:22
阅读次数:
2362
Consider integer numbers from 1 to n. Let us call the sum of digits of an integer number its weight. Denote the weight of the number x as w(x).
Now let us order the numbers using so called graduated ...
分类:
其他好文 时间:
2014-08-10 18:47:20
阅读次数:
406
题目:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Outpu...
分类:
其他好文 时间:
2014-08-10 13:08:30
阅读次数:
296
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,1,2],
and [3,2,1].
原题链接:https://oj...
分类:
其他好文 时间:
2014-08-10 10:25:50
阅读次数:
265
筛法是一种很快的方法,贴代码纪念一下。 做法很像筛法 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #...
分类:
其他好文 时间:
2014-08-10 10:19:50
阅读次数:
223
想到 最小公倍数 其余的就好搞了 ,可是没想到#include #include #include #include #include #include #include #include #include #include #include #include #includeusing names...
分类:
数据库 时间:
2014-08-09 23:11:49
阅读次数:
313