一、题目DescriptionWangpeng is good at drawing. Now he wants to say numbers like “521” to his girlfriend through the game draw something.Wangpeng can’t wr...
分类:
其他好文 时间:
2014-07-22 22:53:15
阅读次数:
242
DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arr...
分类:
其他好文 时间:
2014-07-22 00:20:35
阅读次数:
283
一、题目给定一组数5,2,4,6,1,3,2,6;运用归并排序法对这组数进行排序。二、题目源程序#include#includeint L[100],R[100];void merge(int numbers[],int left, int mid, int right) { ...
分类:
其他好文 时间:
2014-07-22 00:16:35
阅读次数:
218
Semi-prime H-numbers
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 7372
Accepted: 3158
Description
This problem is based on an exercise of David Hilbert, who pedagogically s...
分类:
其他好文 时间:
2014-07-21 11:13:15
阅读次数:
269
Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the or...
分类:
其他好文 时间:
2014-07-21 09:33:03
阅读次数:
218
简单的二叉树的先根遍历模板的应用
class Solution:
# @param root, a tree node
# @return an integer
def hehe(self, num, root):
#再原来的基础上*10,再加上当前的root.val
num = num * 10 + root.val
...
分类:
其他好文 时间:
2014-07-20 22:45:33
阅读次数:
299
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 ...
分类:
其他好文 时间:
2014-07-20 21:32:55
阅读次数:
250
Problem Description
An equal sum partition of a sequence of numbers is a grouping of the numbers (in the same order as the original sequence) in such a way that each group has the same sum. For examp...
分类:
其他好文 时间:
2014-07-20 15:42:42
阅读次数:
256
Problem DescriptionWangpeng is good at drawing. Now he wants to say numbers like “521” to his girlfriend through the game draw something.Wangpeng can’...
分类:
其他好文 时间:
2014-07-19 18:24:12
阅读次数:
205
Power of Fibonacci
Time Limit: 5 Seconds Memory Limit: 65536 KB
In mathematics, Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers of the following integer sequence...
分类:
其他好文 时间:
2014-07-19 11:48:45
阅读次数:
239