razrlele

UVAOJ839

Written by  on February 12, 2015

UVAOJ839 不需要建树,直接遍历,如果平衡就返回正常值,否则返回0. Shell

[Read more...]

UVAOJ327

Written by  on February 8, 2015

UVAOJ327 327 – Evaluating Simple C Expressions Time limit: 3.000 seconds  Evaluating Simple C Expressions  The task in this problem is to evaluate a sequence of simple C expressions, buy you need not know C to solve the problem! Each of the expressions will appear on a line by itself and will contain no more than 110 characters. The expressions to be evaluated will contain only simple integer variables and a limited set of operators; there will be no constants in the expressions. There are 26 variables which may appear in our simple expressions, namely those with the names a through z(lower-case letters only). At the beginning of evaluation of each expression, these 26 variables will have the integer values 1 through 26, respectively (that is, a = 1, b = 2, …, n = 14, o = 15, …,z = 26). Each variable will appear at most once in an expression, and many variables may not be used at all.

[Read more...]

UVAOJ699

Written by  on February 5, 2015

UVAOJ699 699 – The Falling Leaves Time limit: 3.000 seconds   The Falling Leaves  Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the trees. If the same thing happened to binary trees, how large would the piles of leaves become?

[Read more...]

Shell Script实现回收站功能

Written by  on February 4, 2015

将下列代码依次保存 Shell 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071

[Read more...]

UVAOJ712

Written by  on February 3, 2015

UVAOJ712 712 – S-Trees Time limit: 3.000 seconds   S-Trees  A Strange Tree (S-tree) over the variable set is a binary tree representing a Boolean function . Each path of the S-tree begins at the root node and consists of n+1 nodes. Each of the S-tree’s nodes has a depth, which is the amount of nodes between itself and the root (so the root has depth 0). The nodes with depth less than n are callednon-terminal nodes. All non-terminal nodes have two children: the right child and the left child. Each non-terminal node is marked with some variable xi from the variable set Xn. All non-terminal nodes with the same depth are marked with the same variable, and non-terminal nodes with different depth are marked with different variables. So, there is a unique variable xi1 corresponding to the root, a unique variable xi2 corresponding to the nodes with depth 1, and so on. The sequence of the variables is called the variable ordering. The nodes having depth n are called terminal nodes. They have no children and are marked with either 0 or 1. Note that the variable ordering and the distribution of 0’s and 1’s on terminal nodes are sufficient to completely describe an S-tree.

[Read more...]

Bye! Nexus 5!

Written by  on February 1, 2015

Nexus 5今天应该算是正式退役了。其实一个月前不断重启不得已送修的时候就基本上无望了,后来被告知是主板坏了,虽然似乎每一个送售后的手机都会得到这个答复,但是也找不到其他问题在哪里,后来寄回家老爹又送给别人修,然后等了大半个月等来一句不会修,最后只能陈尸在家Orz

[Read more...]

UVAOJ297

Written by  on January 29, 2015

UVAOJ297 297 – Quadtrees Time limit: 3.000 seconds  Quadtrees  A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again be split in four sub quadrants, etc. In the quadtree, the image is represented by a parent node, while the four quadrants are represented by four child nodes, in a predetermined order.

[Read more...]

Arch Linux

Written by  on January 26, 2015

折腾了四五天,最一开始把Installation guide当成Beginners’ guide,卡在分区那里卡了半天卡不明白(因为前者在分区那一块讲的比后者少的多),笔记本上面的Xorg也装了好久都装不成功,就换家里的台式机试,结果显卡驱动又半天装不上(终于理解Linus为什么要对NVIDIA竖中指了),然后又回过头用自己的Thinkpad试,先是Awesome,再是Openbox,越折腾越头大,最后还是选择直接Gnome全套了,横竖自己8G内存+SSD耗得起也懒得精简那多了,不过略惊喜的是Gnome看起来还是很酷炫的,无论如何也总算是完美着陆了。

[Read more...]

20150123

Written by  on January 23, 2015

今夜晚饭还没吃完之时, 老爹牌友就一个电话一个电话接不停地催老爹去赶场子. 老娘:“这么迫不及待? 是有什么事情值得庆祝今天?”

[Read more...]

考试

Written by  on January 19, 2015

现在正在复习Java, 看见那些鬼填空选择抠课本上的概念真是头痛. 反过来看已经考完的三门, 计算机组成原理, 数据库, 计算机网络…哪一门有是有必要闭卷? 难道这年头还规定计算机科学家或者软件工程师平常工作是不允许翻书的么?

[Read more...]