题目描述Given a number sequence whose length is n, you
can delete at most k numbers in the sequence.After that you are asked to answer
the maximum length ...
分类:
其他好文 时间:
2014-05-19 22:21:32
阅读次数:
304
Question 1:Given an array of integers, find two
numbers such that they add up to a specific target number.The function twoSum
should return indices of...
分类:
其他好文 时间:
2014-05-19 09:35:41
阅读次数:
321
oracle使用LEFT JOIN关联产生的问题在查询结果中使用CASE WHEN
无法判断查询方式一: 1 SELECT 2 CASE WHEN (SELECT CAST(SUM(CASE 3 WHEN
(ALLOCABLE_PRIME_CURRENCY_VALUE IS NULL AND ST....
分类:
数据库 时间:
2014-05-18 20:08:35
阅读次数:
1129
#ifndef MAINFUNC_H#define MAINFUNC_H#include
#include #include #include //1. Get the numbers//2. Modify the expression like
(1+1*1)*(1-1); 1 represent...
分类:
其他好文 时间:
2014-05-18 19:54:02
阅读次数:
514
Given a triangle, find the minimum path sum
from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given the fol...
分类:
其他好文 时间:
2014-05-18 02:11:19
阅读次数:
302
Given two numbers represented as strings,
return multiplication of the numbers as a string.Note: The numbers can be
arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-05-18 01:25:07
阅读次数:
288
Implement next permutation, which rearranges
numbers into the lexicographically next greater permutation of numbers.If such
arrangement is not possibl...
分类:
其他好文 时间:
2014-05-17 23:39:30
阅读次数:
272
原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1425
DP题。 f[i][j]表示当前数字为i,分解式中最大质数为j的方案数,那么,状态转移方程为: f[i][j] = sum(f[i-j][k]) 其中...
分类:
其他好文 时间:
2014-05-17 20:41:17
阅读次数:
296
题目描述After the hard tasks, It’s the easy time for
Y.G.Tobor and Y.D.I.Isha is a friend of Y.D.I, as he thinks Tobor is smart too,
he give Tobor a probl...
分类:
其他好文 时间:
2014-05-17 15:20:34
阅读次数:
248
题目来源:POJ 2689 Prime Distance
题意:给出一个区间L R 区间内的距离最远和最近的2个素数 并且是相邻的 R-L
思路:一般素数筛选法是拿一个素数 然后它的2倍3倍4倍...都不是 然后这题可以直接从2的L/2倍开始它的L/2+1倍L/2+2倍...都不是素数
首先筛选出一些素数 然后在以这些素数为基础 在L-R上在筛一次因为 R-L
#include
#i...
分类:
其他好文 时间:
2014-05-15 19:51:58
阅读次数:
313