UVAOJ10557
UVAOJ10557 这个题最关键的部分就是对于环的处理。 先记录下每个点是否已经访问,并且到达那个点时候的能量值,然后碰见环再次访问已经访问过的点的时候,如果能量大于之前,就说明通过这个环能量可以增长到无限大,然后再开启另一个DFS探测环是否有到达终点的路线,如果有那么直接就是winnable,否则的话直接放弃这个环。
AOAPC I: Volume 2.Data Structures-Binary Trees
<<算法竞赛入门经典>> UVaoj第三卷数据结构二叉树习题: 112-Tree Summing UVAOJ112 548-Tree UVAOJ548 297-Quadtrees UVAOJ297 712-S-Trees
UVAOJ10562
UVAOJ10562 应该是UVa的原因,样例输入的格式显示似乎有一点偏差,其实真正的输入是这样的: Shell
UVAOJ327
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.
UVAOJ699
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?
Shell Script实现回收站功能
将下列代码依次保存 Shell 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
UVAOJ712
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.
Bye! Nexus 5!
Nexus 5今天应该算是正式退役了。其实一个月前不断重启不得已送修的时候就基本上无望了,后来被告知是主板坏了,虽然似乎每一个送售后的手机都会得到这个答复,但是也找不到其他问题在哪里,后来寄回家老爹又送给别人修,然后等了大半个月等来一句不会修,最后只能陈尸在家Orz