Description
On a m*m land stationed n troops, numbered from 1 to n. The i-th troop's position can be described by two numbers (xi,yi) (1
Then there are t minutes, in each minute one of the followi...
分类:
其他好文 时间:
2014-07-28 16:25:13
阅读次数:
356
Your task is to write a program that can decide whether you can find an arithmetic expression consisting of five given numbers (1 {1,2,3,4,5} is a bij...
分类:
其他好文 时间:
2014-07-28 15:33:03
阅读次数:
230
周末女朋友不在家,打算做几题LeetCode的题目练练手,Pick One,随机抽中Palindrome Partitioning,题目如下: Given a strings, partitionssuch that every substring of the partition is a ...
分类:
其他好文 时间:
2014-07-28 11:32:20
阅读次数:
417
在 JScript 中,对数据的处理取决于该数据的类型。按值和按引用的比较Numbers 和 Boolean 类型的值 (true 和 false) 是按值来复制、传递和比较的。当按值复制或传递时,将在计算机内存中分配一块空间并将原值复制到其中。然后,即使更改原来的值,也不会影响所复制的值(反过来也...
分类:
其他好文 时间:
2014-07-28 11:25:20
阅读次数:
259
Palindrome Partitioning II
Total Accepted: 11791 Total
Submissions: 66110My Submissions
Given a string s, partition s such that every substring of the partition is a palindrome.
Return t...
分类:
其他好文 时间:
2014-07-27 23:59:19
阅读次数:
592
Description
Mr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have a job, since there are swelling numbers of the...
分类:
其他好文 时间:
2014-07-27 23:57:39
阅读次数:
630
DescriptionYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has e...
分类:
其他好文 时间:
2014-07-27 22:51:29
阅读次数:
288
DescriptionYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has e...
分类:
其他好文 时间:
2014-07-27 22:31:39
阅读次数:
809
定理:一个正整数 n 可以用素因子唯一表示为 p1^r1 * p2^r2 * ...
pk^rk (其中 pi 为素数) , 那么这个数的因子的个数就是,(r1+1)*(r2+1)*...*(rk+1).
理解:为什么是加1之后再相乘,因为一个数的的因子数至少为1和他自身,但因为r1,r2。。可以为0,所以因子的个数为(r1+1)。。。
拓展一下:
定理1: 一个正整数 n 可以用素...
分类:
其他好文 时间:
2014-07-26 15:32:46
阅读次数:
194
Problem Description:
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers
sums to T.
Each number in C may only b...
分类:
其他好文 时间:
2014-07-26 15:24:02
阅读次数:
252