Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 2 # include 3 # include 4 # i....
分类:
其他好文 时间:
2015-07-26 20:45:55
阅读次数:
129
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num...
分类:
其他好文 时间:
2015-07-26 20:36:39
阅读次数:
82
DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calcul...
分类:
其他好文 时间:
2015-07-26 20:35:03
阅读次数:
78
Given an array of integers, every element appearsthreetimes except for one. Find that single one.public class Solution { public int singleNumber(in...
分类:
其他好文 时间:
2015-07-26 20:30:48
阅读次数:
146
题意 把一个数替换为这个数相邻数字差组成的数 知道这个数只剩一位数 若最后的一位数是7 则称原来的数为 July Number 给你一个区间 求这个区间中July Number的个数
从7开始DFS 位数多的数总能由位数小的数推出
#include
using namespace std;
const int N = 1e6;
int july[N], n;
set ans;...
分类:
其他好文 时间:
2015-07-26 19:23:19
阅读次数:
117
Description
The digital difference of a positive number is constituted by the difference between each two neighboring digits (with the leading zeros omitted). For example the digital difference of 113...
分类:
其他好文 时间:
2015-07-26 17:30:30
阅读次数:
111
DNA SortingProblem DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order wit...
分类:
其他好文 时间:
2015-07-26 17:08:12
阅读次数:
179
题意:给一个电话号码,要求返回所有在手机上按键的组合,组合必须由键盘上号码的下方的字母组成。思路:尼玛,一直RE,题意都不说0和1怎么办。DP解决。 1 class Solution { 2 public: 3 vector ans; 4 string str; 5 6 v...
分类:
其他好文 时间:
2015-07-26 17:05:54
阅读次数:
97
DescriptionI have a set of super poker cards, consisting of an infinite number of cards. For each positive composite integer p, there are exactly four...
分类:
其他好文 时间:
2015-07-26 16:59:27
阅读次数:
122
poj 3259 WormholesDescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its...
分类:
其他好文 时间:
2015-07-26 15:53:29
阅读次数:
216