按月份归档:4月 2012

第4题

Problem

You live in a 2-dimensional plane, and one of your favourite places to visit is the Hall of Mirrors. The Hall of Mirrors is a room (a 2-dimensional room, of course) that is laid out in a grid. Every square on the grid contains either a square mirror, empty space, or you. You have width 0 and height 0, and you are located in the exact centre of your grid square.

Despite being very small, you can see your reflection when it is reflected back to you exactly. For example, consider the following layout, where?'#'?indicates a square mirror that completely fills its square,?'.'?indicates empty space, and the capital letter?'X'indicates you are in the center of that square:

######
#..X.#
#.#..#
#...##
######

If you look straight up or straight to the right, you will be able to see your reflection.

Unfortunately in the Hall of Mirrors it is very foggy, so you can’t see further than?D?units away. Suppose?D=3. If you look up, your reflection will be 1 unit away (0.5 to the mirror, and 0.5 back). If you look right, your reflection will be 3 units away (1.5 to the mirror, and 1.5 back), and you will be able to see it. If you look down, your reflection will be 5 units away and you won’t be able to see it. 阅读全文 ……

第3题

Problem

Do you ever become frustrated with television because you keep seeing the same things, recycled over and over again? Well I personally don’t care about television, but I do sometimes feel that way about numbers.

Let’s say a pair of distinct positive integers (n,?m) is?recycled?if you can obtain?m?by moving some digits from the back of?n?to the front without changing their order. For example, (12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front. Note that?n?and?m?must have the same number of digits (excluding leading zeros) in order to be a recycled pair. 阅读全文 ……

第2题

Problem

You’re watching a show where Googlers (employees of Google) dance, and then each dancer is given a?triplet of scores?by three judges. Each triplet of scores consists of three integer scores from 0 to 10 inclusive. The judges have very similar standards, so it’ssurprising?if a triplet of scores contains two scores that are 2 apart. No triplet of scores contains scores that are more than 2 apart. 阅读全文 ……

eclipse vi插件的安装

1、下载viPlugin下载地址:http://www.viplugin.com/

2在 eclipse 目录下面,新建?viPlugin2.lic ,然后写如下面内容:

vimPlugin是eclipse下的vim插件,很好用

 

q1MHdGlxh7nCyn_FpHaVazxTdn1tajjeIABlcgJBc20

3保存,重启 eclipse 即可!

规划自己职业生涯–做个架构师

 

十余年的学生时代结束了,两年多的大学就要结束了。终于,自己也如愿的进入自己喜欢的计算机领域。成为了,一名,准程序员。每天,读计算机的书,看计算机的新闻,论坛,博客,写着经理给布置的任务代码。but,我只是一个码农。

不想你辈子做码农,不想碌碌无为的工作。每天想法的程序员,就像黑客帝国里没有被解救的尼奥,也许只是被利用的电池。

规划自己的职业生涯,给自己一个目标,不为眼前短暂的花花世界迷惑。也不为安逸的生活萎靡自己。

我给自己定位,5年,成为zhangziyou,android的架构师。5年,对于程序员来讲,太短暂,每天做同样的工作,做写同样的代码,永远没有进步,只有用不止步,才能成就自己。 阅读全文 ……