原创 1116 Come on Lets C (20分)

"Let's C" is a popular and fun programming contest hosted by the College of Computer Science and Technology, Zhejiang U

原创 1072 Gas Station (30分)

  A gas station has to be built at such a location that the minimum distance between the station and any of the residen

原创 1026 Table Tennis (30分)

A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players,

原创 1066 Root of AVL Tree (25分)

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node d

原创 1007 Maximum Subsequence Sum (25分) [DP]

  Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1

原创 1146 Topological Order (25分)[拓撲序列]

  This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obta

原创 1134 Vertex Cover (25分)[模擬]

  A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of

原创 1111 Online Map (30分) [Dijkstra]

Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend t

原创 1087 All Roads Lead to Rome (30分)

  Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route

原创 1135 Is It A Red-Black Tree (30分)

There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 prope

原创 1138 Postorder Traversal (25分)

  Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal s

原创 1123 Is It a Complete AVL Tree (30分)

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node d

原创 1127 ZigZagging on a Tree (30分)【重建二叉樹/Z字型遍歷二叉樹】

Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a

原创 1076 Forwards on Weibo (30分)

Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other

原创 1034 Head of a Gang (30分)

One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A a