问题描述
When Deathmoon played MC game, he faced a math problem. When he found a ancient tomb and came in, he found two polynomials f(x) and g(x) no the wall, only did he calculate f(x) + g(x) correctly ...
分类:
其他好文 时间:
2014-05-10 09:57:54
阅读次数:
300
The Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry two-way transceivers so they can stay in constant contact. Of course, these transceivers have...
分类:
其他好文 时间:
2014-05-10 09:11:21
阅读次数:
334
Given two words word1 and word2, find the
minimum number of steps required to convert word1 to word2. (each operation is
counted as 1 step.)You have t...
分类:
其他好文 时间:
2014-05-09 19:09:35
阅读次数:
318
JavaScript中的两个等号(==)和三个等号(===):Determining whether
two variables are equivalent is one of the most important operations in
programming.
分类:
编程语言 时间:
2014-05-09 11:44:17
阅读次数:
579
【题目】
原文:
1.3 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An
extra copy of...
分类:
其他好文 时间:
2014-05-07 08:48:12
阅读次数:
372
题目大意:
添加和删除一个数,然后输出中位数。
简单的Splay 维护Splay上有多少个节点就可以了
#include
#include
#define inf 1LL<<60
#define maxn 222222
#define keyTree (ch[ch[root][1]][0])
using namespace std;
typedef long...
分类:
其他好文 时间:
2014-05-07 07:46:42
阅读次数:
405
Paint the Grid Reloaded
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Leo has a grid with N rows and M columns. All cells are painted with either black or white initially.
Two cells A ...
分类:
其他好文 时间:
2014-05-07 07:28:35
阅读次数:
480
In this problem you will perform median filtering to enhance the quality of a noise corrupted
image. Recall from the video lecture that median filtering is effective for removing "salt-and-pepper" n...
分类:
其他好文 时间:
2014-05-07 07:20:09
阅读次数:
326
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gr...
分类:
其他好文 时间:
2014-05-07 06:10:17
阅读次数:
370
这道题看似简单,其实很坑爹啊,动不动就是Time Limit Exceeded,
比如我下面这段TLE的代码,我感觉方法是对的,但是too
naive,算法复杂度到了O(N^2),自然就TLE了而且有一些小语法错误需要注意:for(runner=current+1;;)不能用>;一定所有的case都...
分类:
其他好文 时间:
2014-05-06 11:31:09
阅读次数:
405