The Clocks
IOI'94 - Day 2
Consider nine clocks arranged in a 3x3 array thusly:
|-------| |-------| |-------|
| | | | | | |
|---O | |---O | | O | ...
分类:
其他 时间:
2014-02-05 13:43:52
收藏:
0 评论:
0 赞:
0 阅读:
431
伍斌_Ben已经完成了bjdp.org将于2月23日在编程道场上驯服Trivia烂代码的Java编程操练题目。驯服的过程,就如同把妖猴悟空驯服成佛一样,可以总结为三步:观察、保护、重构。源代码与详细重构过程已经上传github供下载参考。...
分类:
其他 时间:
2014-02-05 13:33:02
收藏:
0 评论:
0 赞:
0 阅读:
358
软件开发公司总是活多人少。开发经理不得不让小猫同时参与下面3个项目的编程:钓鱼、捉蜻蜓、逮蝴蝶。...
分类:
其他 时间:
2014-02-05 13:40:32
收藏:
0 评论:
0 赞:
0 阅读:
342
在多核年代提倡并行编程,然而锁技术大大削弱了系统的并行性。cpu的使用率并不高。 而且一些开源的框架由于锁问题导致了并行性能不好。 但是目前流行的无锁编程、事务同步扩展技术(包括有限事务内存和硬件锁消除)等技术大大提高了系统的并行性。这里介绍了这三者。并且深刻提取了这三者的技术特点和相互之间的区别。...
分类:
其他 时间:
2014-02-05 13:51:22
收藏:
0 评论:
0 赞:
0 阅读:
542
在Linux下查看内存我们一般用free命令:
[root@scs-2 tmp]# free
total used free shared buffers cached
Mem: 3266180 3250004 16176 0 110652 2668236
-/+ buffers/cache: 471116 2795064
Swap: 2048276 80160 19...
分类:
其他 时间:
2014-02-05 13:19:42
收藏:
0 评论:
0 赞:
0 阅读:
406
教你如何快速下载旧版本的Firefox浏览器...
分类:
其他 时间:
2014-02-05 13:50:32
收藏:
0 评论:
0 赞:
0 阅读:
324
/*
* 解题思路:
* 简单的排序后查找
*/
#include
#include
#include
#define A 10010
int a[ A ];
int m,n;
int cmp( const void *a , const void *b )
{ return *( int *)a - *(int *)b; }
int search( int x )
{
...
分类:
其他 时间:
2014-02-05 13:25:32
收藏:
0 评论:
0 赞:
0 阅读:
367
由于使用VIM很久以来,一直没有觉得VIM是多么的方便,是多么的快捷
我仔细想了一下,很有可能是因为我一直依赖于VIM的编辑模式
这样的话与使用别的简单的编辑器就没什么两样了
效率上的优势也就没能体现出来了...
分类:
其他 时间:
2014-02-05 13:10:32
收藏:
0 评论:
0 赞:
0 阅读:
296
题目描述:
大数学家高斯有个好习惯:无论如何都要记日记。
他的日记有个与众不同的地方,他从不注明年月日,而是用一个整数代替,比如:4210
后来人们知道,那个整数就是日期,它表示那一天是高斯出生后的第几天。这或许也是个好习惯,它时时刻刻提醒着主人:日子又过去一天,还有多少时光可以用于浪费呢?
高斯出生于:1777年4月30日。...
分类:
其他 时间:
2014-02-05 13:42:12
收藏:
0 评论:
0 赞:
0 阅读:
521
何为策略,就是可以实现目标的方案集合。而完成一项任务有不同的方式,每一种方式称为一个策略。策略模式就是定义一系列算法,将每一个算法封装起来,并让他们可以相互替换。很简单的一个例子:年底移动公司推出很多的活动,比如说:存话费赠食用油,交话费赠话费,买手机赠话费
等等。推出这些个活动目的就只有一个,刺激消费为公司创造利润,而我们可以将这些个活动当做一个一个的策略,如下:
abstract clas...
分类:
其他 时间:
2014-02-05 13:38:02
收藏:
0 评论:
0 赞:
0 阅读:
403
Description
For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. ...
分类:
其他 时间:
2014-02-05 13:24:42
收藏:
0 评论:
0 赞:
0 阅读:
475
/*
* 解题思路:
* 给出一棵树的三位坐标,挨个求每棵树离它最近那棵树距离下取整的值为0~9哪个距离值,就在那个距离值上+1
* 最后记得换行
*/
#include
#include
#include
#include
#define A 10000
#define INF 0x5fffff
int p;
int x[ A ],y[ A ],z[ A ];
i...
分类:
其他 时间:
2014-02-05 13:09:42
收藏:
0 评论:
0 赞:
0 阅读:
369
/*
* 解题思路:
*
Bubble sort 的一道水题
*/
#include
int main( )
{
int t,n;
int i,j;
int train[ 60 ];
int sum,tmp;
scanf("%d",&t);
while( t-- )
{
scanf("%d",&n);
...
分类:
其他 时间:
2014-02-05 13:35:32
收藏:
0 评论:
0 赞:
0 阅读:
377
Question:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/...
分类:
其他 时间:
2014-02-05 13:48:02
收藏:
0 评论:
0 赞:
0 阅读:
385
Question:
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
/**
* Definition for binary tree
* publi...
分类:
其他 时间:
2014-02-05 13:43:02
收藏:
0 评论:
0 赞:
0 阅读:
341
Question:
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
/**
* Definition for binary tree
* publ...
分类:
其他 时间:
2014-02-05 13:31:22
收藏:
0 评论:
0 赞:
0 阅读:
390
Question:
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9...
分类:
其他 时间:
2014-02-05 13:08:52
收藏:
0 评论:
0 赞:
0 阅读:
336
代码如下: 1 using System; 2 using
System.Collections.Generic; 3 using System.Text; 4 using System.IO; 5 6
namespace GetCRC32 7 { 8 class CRC32Cls 9 {10 pr...
分类:
其他 时间:
2014-02-05 13:54:42
收藏:
0 评论:
0 赞:
0 阅读:
529
/*如果n=m+1,那么由于一次最多只能取m个,所以,无论先取者拿走多少个,后取者都能够一次拿走剩余的物品,后者取胜。因此我们发现了如何取胜的法则:如果n=(m+1)r+s,(r为任意自然数,s≤m),那么先取者要拿走s个物品,如果后取者拿走k(≤m)个,那么先取者再拿走m+1-k个,结果剩下(m+...
分类:
其他 时间:
2014-02-05 13:45:32
收藏:
0 评论:
0 赞:
0 阅读:
407
FusionCharts 的 XML标签属性有一下四种数据类型 * Boolean -
布尔类型,只能为1或者0。例如: * Number - 数字类型,只能为数字。例如: * String - 字符串类型,只能为字符串。例如: * Hex
Color Code - 十六进制颜色代码,前边没有’#’...
分类:
其他 时间:
2014-02-05 13:16:22
收藏:
0 评论:
0 赞:
0 阅读:
407