Lucky Light
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 272 Accepted Submission(s): 74
Problem Description
We have a (point)...
分类:
其他好文 时间:
2014-05-18 18:44:16
阅读次数:
273
【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
For example,
Given input array A ...
分类:
其他好文 时间:
2014-05-18 18:25:19
阅读次数:
272
题目链接:
点击打开链接
题目:
Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch...
分类:
其他好文 时间:
2014-05-18 15:56:34
阅读次数:
264
【题目】
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
【题意】
删除数组中指定的值。不关心在新数组的后面即数组尾部留下了什么值。
【思路】
思路同Remo...
分类:
其他好文 时间:
2014-05-18 14:53:56
阅读次数:
208
【题目】
Divide two integers without using multiplication, division and mod operator.
【题意】
计算两个数的商,不能使用乘、除、取余操作
【思路】
用加法,确定多少除数相加其和恰好<=被除数
为了提高算法效率,利用贪心思想,采用滚雪球式的翻倍叠加策略,使和快速逼近被除数
集中特殊情况需要注意:
1. 结果是负数
...
分类:
其他好文 时间:
2014-05-18 10:42:00
阅读次数:
259
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5235
Calculate the Function
Time Limit: 2 Seconds Memory Limit: 65536 KB
You are given a list of numbers A1 A2 .. AN...
分类:
其他好文 时间:
2014-05-18 09:52:49
阅读次数:
410
【题目】
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.
For example, given:
S:...
分类:
其他好文 时间:
2014-05-18 08:31:48
阅读次数:
228
题目大意:
给出N个数
0 操作 把 l ----- r之间的数全部开平方
1 操作 输出 l -----r 之间的和
思路分析:
判断区间里的数字是否全相同。如果相同,
将cov 置为该数
查询的时候和更新的时候,如果碰到cov != -1 的 就直接返回就可以了
#include
#include
#include...
分类:
其他好文 时间:
2014-05-18 05:25:06
阅读次数:
227
//rbtree.h /* Red Black Trees (C) 1999 Andrea
Arcangeli This program is free software; you can redistribute it and/or modify
it under the terms of the...
分类:
系统相关 时间:
2014-05-18 01:05:37
阅读次数:
489
很久之前的事情了,微软2014实习生的在线测试题,记录下来以备后用。题目描述:DescriptionConsider
a string set that each of them consists of {0, 1} only. All strings in the set
have the sam...
分类:
其他好文 时间:
2014-05-18 00:17:25
阅读次数:
280