题目描述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
第一种方法--及时回收bitmap内存:一般而言,回收bitmap内存可以用到以下代码if(bitmap!=null&&!bitmap.isRecycled()){bitmap.recycle();bitmap=null;}System.gc();bitmap.recycle()方法用于回收该bit...
分类:
移动开发 时间:
2014-05-18 21:26:21
阅读次数:
519
Given a stringS, find the longest palindromic
substring inS. You may assume that the maximum length ofSis 1000, and there
exists one unique longest pa...
分类:
其他好文 时间:
2014-05-18 19:39:55
阅读次数:
355
求树的最大路径和(Binary Tree Maximum Path Sum)...
分类:
其他好文 时间:
2014-05-18 18:25:41
阅读次数:
235
题目链接:11270 - Tiling Dominoes
和POJ 2411一样的题目,试着用插头DP写了下
代码:
#include
#include
#include
using namespace std;
int n, m, pre = 0, now = 1;
long long dp[2][2222];
int main() {
while (~scanf("%d%d",...
分类:
其他好文 时间:
2014-05-18 14:44:37
阅读次数:
264
题目链接:11375 - Matches
题目大意:给出n根火柴,问说能组成多少种数字,要求说0不能打头。
解题思路:d[i]表示i根火柴能够组成的数量,d[i+c[j]] = d[i+c[j]] + d[i];
最后dp[i]表示小于等于i根火柴能组成的数量,dp[i]=∑jidp[j].
高精度。
#include
#include
#include
using na...
分类:
其他好文 时间:
2014-05-18 10:21:35
阅读次数:
286
本题大概题意:
给出一个数组DNA,包含10个数值,如:DNA[10] = {0,1,2,3,,1,2,3,0,1,2}所有数值应该不大于3.
给出一行40个字符的字符串: 空格代表0, '.'代表1,'x'代表2,'W'代表3。 相邻三个数值(或两个数值)相加得到的数作为DNA的下标,然后取DNA数组改下标的数值为新的值。产生新的字符串。
好难说清楚,看原文吧,的确是很难理解的题目:
h...
分类:
其他好文 时间:
2014-05-18 03:14:55
阅读次数:
287
C - The Dole Queue
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu
Submit Status
Description
The Dole Queue
In a serious attempt to down...
分类:
其他好文 时间:
2014-05-18 03:10:48
阅读次数:
326
jvm性能优化及内存分区2012-09-17 15:51:37分类:JavaSome of the
default values for Sun JVMs are listed below.JDK 1.3.1_06 Initial Size Maximum
SizeClient JVM 1MB 32...
分类:
其他好文 时间:
2014-05-18 02:46:12
阅读次数:
311
程序中存在较多的较验,出现Maximum execution time of 30
seconds
exceeded,在网上查到的解决办法,问题解决,备忘来源网址:http://www.oschina.net/code/snippet_262017_19330今天给朋友配置wamp的时候,刚刚搭建好...
分类:
其他好文 时间:
2014-05-17 18:49:00
阅读次数:
248