PAT
iserfj
这个作者很懒,什么都没留下…
展开
-
PAT-A1135 Is It A Red-Black Tree(30)
时间限制: 400 ms 内存限制: 64 MB 代码长度限制: 16 KB There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties:(1) Every node is either ...原创 2018-08-29 19:37:52 · 287 阅读 · 0 评论 -
PAT-A1014 Waiting in Line (30)
时间限制: 400 ms 内存限制: 64 MB 代码长度限制: 16 KBSuppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the c...原创 2018-08-24 00:46:41 · 249 阅读 · 0 评论 -
PAT-A1149 Dangerous Goods Packaging/PAT-B1090 危险品装箱 (25)
甲级题目: When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in serious trouble. For example, oxidizing age...原创 2018-09-09 00:48:48 · 611 阅读 · 0 评论 -
PAT-A1151 LCA in a Binary Tree (30)
The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.Given any two nodes in a binary tree, you are supposed to find their LCA.In...原创 2018-09-09 01:20:12 · 673 阅读 · 0 评论 -
PAT-A1150 Travelling Salesman Problem (25)
The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and retu...原创 2018-09-09 02:01:49 · 490 阅读 · 0 评论 -
PAT-A1148 Werewolf - Simple Version/PAT-B1089 狼人杀-简单版 (20)
Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: "Player #2 is a werewolf."; player #2 sai...原创 2018-09-10 00:51:47 · 524 阅读 · 3 评论