Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.
The teacher has written down the sum of multiple numbers. Pupils should ca...
分类:
其他好文 时间:
2014-07-22 23:05:53
阅读次数:
382
OJ题目:click here~~
题目分析:n个数,从中取若干个数,和为n的倍数。给出一种取法。
因为只要给出其中一种方案就行,鸽笼原理可以求出取出的数为连续的方案。
关于鸽笼原理,点这里~
直接贴过来:
有n+1件或n+1件以上的物品要放到n个抽屉中,那么至少有一个抽屉里有两个或两个以上物品。
如果你知道这个结论:
a1,a2,a3...am是正整数序列,至少存在整数k和r,...
分类:
其他好文 时间:
2014-07-22 23:04:32
阅读次数:
258
Given a linked list, reverse the nodes of a
linked listkat a time and return its modified list.If the number of nodes is not
a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-05-09 12:00:21
阅读次数:
309
There are no interfaces on which a capture can be
done解决方法:Open a terminal by pressingCtrl+Alt+Tand type the following
commands:sudo dpkg-reconfigure ...
分类:
其他好文 时间:
2014-05-08 22:18:45
阅读次数:
397
登陆mysql
harvey@harvey-Virtual-Machine:~/ruby/mydiary$ mysql -u root -pEnter password:
Welcome to the MySQL monitor. Commands end with ; or \g. 查看所有的数据...
分类:
数据库 时间:
2014-05-07 20:06:47
阅读次数:
452
import org.junit.Test;
public class Multiple {
public void printMultiple99() {
int i = 1;
for (; i < 10; i++)
for (int j = 1; j <= i; j++)
System.out.print(j + "*" + i + "=" + i * j + " ...
分类:
其他好文 时间:
2014-05-07 06:46:25
阅读次数:
359
(defun buffer-exists (bufname)
(not (eq nil (get-buffer bufname))))
(defun make-shell (name)
"Create a shell buffer named NAME."
(interactive "sName: ")
(if (buffer-exists "*eshell*")...
分类:
其他好文 时间:
2014-05-06 19:40:04
阅读次数:
262
1.利用返回值而不是副作用来写程序(副作用包含破坏性修改对象以及对变量赋值).2.需要返回多个值请使用multiple-value-bind和values的组合方式.3.函数式编程需要思考你要什么,而不是要怎么做.4.一个给定的调用可以安全的修改它唯一拥有的东西(函数拥有被调用函数返回的对象,但不拥...
分类:
其他好文 时间:
2014-05-05 23:30:48
阅读次数:
358
reference
from:http://www.cs.bgu.ac.il/~spl051/Personal_material/Practical_sessions/Ps_12/ps12.htmlJava
server class with multiple client connections:...
分类:
其他好文 时间:
2014-05-04 10:15:23
阅读次数:
355
When multiple threads share mutable data, each
thread that reads or writes the data must perform synchronization. Without
synchronization, there is no...
分类:
数据库 时间:
2014-05-01 09:14:25
阅读次数:
506