问题描述
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
【题目】
原文:
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
public class LinkedList {
Node head = null;
Node tail = null;
int length = 0;
public void add(Object object) {
Node node = new Node(object, null);
if (head == null) {
head = tail = nod...
分类:
其他好文 时间:
2014-05-07 08:24:17
阅读次数:
306
public class ArrayList {
Object[] objects = new Object[10];
int index = 0;
public void add(Object object) {
if (index == objects.length) {
Object[] newObjects = new Object[objects.length*2];
...
分类:
其他好文 时间:
2014-05-07 07:57:10
阅读次数:
257
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
The Little Elephant likes permutations. This time he has a permutation A[1], A[2], ..., A[N] of numbers 1, 2, ...,N.
He calls a permutation A good, if the number of its inversions is equal to the n...
分类:
其他好文 时间:
2014-05-07 07:20:50
阅读次数:
356
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
eshell是emacs shell的简称,是emacs自带的shell.开始设置的时候还在想是否要找到它的key map (eshell-mode-map?).
原来它是采用hook设置,如下所示
(add-hook 'eshell-mode-hook
(lambda ()
(local-set-key (kbd "C-j") 'switch-to...
分类:
其他好文 时间:
2014-05-07 05:25:39
阅读次数:
253
Subtraction Game 1
Chef is playing a game on a sequence of N positive integers, say A1, A2, ... AN. The game is played as follows.
If all the numbers are equal, the game ends.Otherwise
Sele...
分类:
其他好文 时间:
2014-05-07 03:14:01
阅读次数:
280