微软 2017春招真题 题目 There is a tree of N nodes which are numbered from 1 to N. Unfortunately, its edges are missing so we don't know how the nodes are connected. Instead we know: Which nodes are leaves The distance (number of edges) between any pair o…
There is a tree of n vertices. For each vertex a list of all its successors is known (not only direct ones). It is required to restore the tree or to say there is no such tree. Input The first line contains a single integer n (1 ≤ n ≤ 1000) — the num…
There is a tree of N nodes which are numbered from 1 to N. Unfortunately, its edges are missing so we don't know how the nodes are connected. Instead we know: 1. Which nodes are leaves 2. The distance (number of edges) between any pair of leaves 3. T…
iOS Programming State Restoration 状态存储 If iOS ever needs more memory and your application is in the background, Apple might kill it to return memory to the system. 如果iOS 需要更多的memory,你的应用在后台,apple 可能杀死它来得到更多的内存给系统. This should be transparent to your u…