• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






tccbj

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页

2019年2月22日

PAT A1151 LCA in a Binary Tree (30 分)——二叉树,最小公共祖先(lca)
摘要: 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 bin 阅读全文
posted @ 2019-02-22 10:36 tccbj 阅读(208) 评论(0) 推荐(0)
 

2019年2月21日

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 shor 阅读全文
posted @ 2019-02-21 14:59 tccbj 阅读(373) 评论(0) 推荐(0)
 
PAT A1149 Dangerous Goods Packaging (25 分)——set查找
摘要: 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 s 阅读全文
posted @ 2019-02-21 14:02 tccbj 阅读(138) 评论(0) 推荐(0)
 
PAT A1148 Werewolf - Simple Version (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 阅读全文
posted @ 2019-02-21 11:01 tccbj 阅读(205) 评论(0) 推荐(0)
 

2019年2月20日

PAT A1129 Recommendation System (25 分)——set,结构体重载小于号
摘要: Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that 阅读全文
posted @ 2019-02-20 21:58 tccbj 阅读(275) 评论(0) 推荐(0)
 
PAT A1128 N Queens Puzzle (20 分)——数学题
摘要: The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus, a solutio 阅读全文
posted @ 2019-02-20 21:07 tccbj 阅读(513) 评论(0) 推荐(0)
 
PAT A1144 The Missing Number (20 分)——set
摘要: Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains 阅读全文
posted @ 2019-02-20 20:47 tccbj 阅读(191) 评论(0) 推荐(0)
 
PAT A1145 Hashing - Average Search Time (25 分)——hash 散列的平方探查法
摘要: The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of inte 阅读全文
posted @ 2019-02-20 20:27 tccbj 阅读(544) 评论(0) 推荐(0)
 
PAT A1146 Topological Order (25 分)——拓扑排序,入度
摘要: This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed grap 阅读全文
posted @ 2019-02-20 20:20 tccbj 阅读(381) 评论(0) 推荐(0)
 
PAT A1147 Heaps (30 分)——完全二叉树,层序遍历,后序遍历
摘要: In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the 阅读全文
posted @ 2019-02-20 20:18 tccbj 阅读(279) 评论(0) 推荐(0)
 
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页