题目链接Problem discriptionGiven two sorted integer
arrays A and B, merge B into A as one sorted array.Note:You may assume that A
has enough space (size t...
分类:
其他好文 时间:
2014-06-16 11:12:36
阅读次数:
192
Given a binary tree, determine if it is
height-balanced.For this problem, a height-balanced binary tree is defined as a
binary tree in which the depth...
分类:
其他好文 时间:
2014-06-12 08:10:28
阅读次数:
194
湖南师范大学 11460 区间求最值
区间求最值
Problem description
给定一个长度为N 的数组,有q个询问,每个询问是求在数组的一段区间内那个元素的因子的个数最大,比如24的因子的个数就是8。
Input
首先是一个整数t,表示有t组测试数据,每组测试数据的第一行是一个整数N(1i(1ii,r...
分类:
其他好文 时间:
2014-06-10 18:26:09
阅读次数:
260
数塔
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 20786 Accepted Submission(s): 12486
Problem Description
在讲述DP算法的时候,一个经典的例子就是数...
分类:
其他好文 时间:
2014-06-10 18:03:42
阅读次数:
272
免费馅饼
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 24440 Accepted Submission(s): 8264
Problem Description
都说天上不会掉馅饼,但有一天gamebo...
分类:
其他好文 时间:
2014-06-10 18:03:05
阅读次数:
184
题目
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement t...
分类:
其他好文 时间:
2014-06-10 17:32:23
阅读次数:
174
给一个长度为 n
的杆子,切成小段卖出去,价格根据小段的长度不同而不同。下面是一个例子我们要通过切成小段卖出尽可能高的总价钱。问题是:How to decompose the
problem?Decomposition 的第一步是:第一刀切在哪?可以切在最左边(等于整根卖出去);可以切在位置1,位置...
分类:
其他好文 时间:
2014-06-10 16:43:26
阅读次数:
345
感谢微信平台----一天一道算法题---------每天多一点进步----今天 刚刚又玩了2盘
LOL 把我的时间全给弄光了.....因为 晚上 可能开始写课程设计了 抓紧时间 写了今天的关于那个 stack的 感觉超出我预期想象了 得压几天了
哎..problem: 求和为指定数字的连续正整数序....
分类:
其他好文 时间:
2014-06-10 12:25:10
阅读次数:
244
【比赛链接】:http://acm.hunnu.edu.cn/online/?action=problem&type=list&courseid=132A:跑得快计数程序【题解】:细心点,巧妙乘2处理四舍五入,简单模拟【代码】:
1 #include 2 #include 3 #include .....
分类:
其他好文 时间:
2014-06-10 10:40:22
阅读次数:
227