题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4908题目意思:给出 一个从1~N 的排列你和指定这个排列中的一个中位数m,从这个排列中找出长度为奇数,中位数是m的子序列有多少个。 我的做法被discuss 中的测试数据一下子就否定了。 这...
分类:
其他好文 时间:
2014-08-23 22:50:11
阅读次数:
303
问题描述:
上午刚刚到办公室,就有监控人员邮件反馈,昨晚NDMCDB407数据库被重启过,让我分析一下数据库重启的原因。由于昨晚业务有版本上线,所以短信警告关闭了,所以没有短信下发到我手机上,而且故障时相关人员也没有通知到我。
1 检查alert日志
从alert日志中,可以看到,先是在03:29时有一个job运行失败了:
Fri Aug 22 03:29:29 2014
Error...
分类:
数据库 时间:
2014-08-23 17:45:01
阅读次数:
373
Consider this sequence {1, 2, 3, … , N}, as a initial sequence of firstN natural numbers. You can rearrange this sequence in many ways. Therewill be
N! different arrangements. You have to calculate t...
分类:
其他好文 时间:
2014-08-23 15:27:01
阅读次数:
202
A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the sub...
分类:
其他好文 时间:
2014-08-23 11:22:40
阅读次数:
198
LeetCode: Word BreakGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more di...
分类:
其他好文 时间:
2014-08-22 23:42:29
阅读次数:
215
(我自己使用的"笨办法", 就是 class point + 手动去除 (set/get这类抽象层次很低的函数 + onWin常见消息) + when hit 这样, 通过debug output, dynamic 输出了 call sequence. 但归根到底, 找到准确无误的 call sta...
分类:
其他好文 时间:
2014-08-22 21:08:19
阅读次数:
374
LCS stands for longest common subsequence, and it is a well known problem. A sequence in thisproblem means a list of integers, and a sequence X is con...
分类:
其他好文 时间:
2014-08-22 00:14:45
阅读次数:
303
问题:Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter...
分类:
编程语言 时间:
2014-08-21 22:47:14
阅读次数:
184
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11. 11 is read of...
分类:
其他好文 时间:
2014-08-21 01:32:23
阅读次数:
141
Problem Description
Number theory is interesting, while this problem is boring.
Here is the problem. Given an integer sequence a1, a2, …, an, let S(i) = {j|1j is a multiple of ai}. If S(i) is no...
分类:
其他好文 时间:
2014-08-20 16:34:02
阅读次数:
184