Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m...
分类:
其他好文 时间:
2014-08-15 20:53:19
阅读次数:
240
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394 Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others)Memory Limi...
分类:
其他好文 时间:
2014-08-15 20:49:39
阅读次数:
227
Number Transformation
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 617 Accepted Submission(s): 313
Problem Description
Teache...
分类:
其他好文 时间:
2014-08-15 19:42:49
阅读次数:
210
题目:
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space to hold additional elements from B. The number of elements initia...
分类:
其他好文 时间:
2014-08-15 18:00:09
阅读次数:
194
Colossal Fibonacci Numbers!
The i'th Fibonacci number f (i) is recursively defined in the following way:
f (0) = 0 and f (1) = 1f (i+2) = f (i+1) + f (i) for every i ≥ 0
Your task is to comput...
分类:
其他好文 时间:
2014-08-15 17:55:09
阅读次数:
241
题目一:根据电话上字母和数字的对应关系,用一个有意义的单词来表述一个电话号码,如用computer表示26678837
题目二:反过来,给定一个电话号码,是否可以用一个单词来表示呢?怎样表示最快呢?显然不是所有的电话号码都可以对应到单词上去
首先来看看leetcode上一个类似的题目:
Letter Combinations of a Phone Number
G...
分类:
其他好文 时间:
2014-08-15 16:11:50
阅读次数:
257
原题:
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it withou...
分类:
其他好文 时间:
2014-08-15 14:46:48
阅读次数:
207
Problem Description
Teacher Mai has an integer x.
He does the following operations k times. In the i-th operation, x becomes the least integer no less than x, which is the multiple of i.
He w...
分类:
其他好文 时间:
2014-08-15 14:41:45
阅读次数:
165
题意很简单了,对一个区间有两种操作:
1. "C A B C" Color the board from segment A to segment B with color C.
//A~B涂上颜色C
2. "P A B" Output the number of different colors painted between segment A and segment B (includ...
分类:
其他好文 时间:
2014-08-15 14:39:58
阅读次数:
292
扫描枪实际上就是一输入设备,只不过它每次在输入的内容后面添加一个回车。因此在web中可以使用js监听回车事件。处理代码如下:jQuery(function() { jQuery(document).on('keydown','.card_number', function(e){ e = e|...
分类:
Web程序 时间:
2014-08-15 12:49:18
阅读次数:
183