题目链接:http://poj.org/problem?id=3041
Asteroids
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 14022
Accepted: 7629
Description
Bessie wants to...
分类:
其他好文 时间:
2014-05-07 05:59:05
阅读次数:
366
1,遇到的问题就是 redis 2.8 版本依赖 Google 的 TCMalloc
TCMalloc(Thread-Caching Malloc)是google开发的开源工具──“google-perftools”中的成员。与标准的glibc库的malloc相比,
TCMalloc在内存的分配上效率和速度要高得多,可以在很大程度上提高MySQL服务器在高并发情况下的性能,降低系统负载...
分类:
其他好文 时间:
2014-05-07 05:41:35
阅读次数:
344
[Question]
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 the two numbers such that they add up to t...
分类:
其他好文 时间:
2014-05-07 05:37:44
阅读次数:
278
请不要随便指点别人该怎么做、每个人的人生都应该自己掌握、你给不了别人一切、你也不懂别人的忧伤、
微笑不代表快乐、哭泣不一定悲伤
不努力怎么让那些关心你的人幸福、不努...
分类:
其他好文 时间:
2014-05-07 05:21:00
阅读次数:
239
题目链接:uva 1371 - Period
题目大意:给出两个字符串A,B将B分解成若干个子字符串,然后每个子字符串都要变成字符串A,所有子串中编辑最多的次数即为当前状态下的最大编辑次数,要求求最小的最大编辑次数。
解题思路:二分答案,用dp判断,主要是dp判断,dp[i][j]表示到1~i的字符串匹配到j的最大编辑次数,然后考虑分段的时候只要dp[i][0]
...
分类:
其他好文 时间:
2014-05-07 05:09:12
阅读次数:
282
linux 下安装jdk及配置jdk环境
一:先检测是否已安装了JDK
执行命令:
# rpm -qa|grep jdk
或
# rpm -q jdk
或
#find / -name jdk*
/soft/openfire_java/jdk-7u40-linux-x64.rpm
/usr/java/jdk1.7.0_15
/usr/java/jdk1.7.0_...
分类:
系统相关 时间:
2014-05-07 05:06:00
阅读次数:
427
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4722
思路:数位dp,dp[i][j]表示到第i位,数字和%10为j,然后进行dp,注意完全匹配的情况是要+1,而其他情况是从0 到 9 都要考虑
代码:
#include
#include
#include
#include
using namespace std;
int t;
l...
分类:
其他好文 时间:
2014-05-07 04:55:37
阅读次数:
314
接着这个系列,前几个又重新写匈牙利算法时,发现了一种更为简洁的实现方式,和上一篇文章相比http://blog.csdn.net/smartxxyx/article/details/9672181,
这个算法更为简洁,也好理解。和维基百科上介绍的算法思路是一致的。...
分类:
其他好文 时间:
2014-05-07 03:27:01
阅读次数:
301
For a given positive integer n, please find the smallest positive integer x that we can find an integer y such that y^2 = n +x^2.
Input
The first line is an integer T, which is the the...
分类:
其他好文 时间:
2014-05-06 19:21:10
阅读次数:
290