PAT甲级进步点
远行客_Dy
这个作者很懒,什么都没留下…
展开
-
PAT甲 2019年秋季考试 7-1 Forever (20 分) DFS+剪枝
7-1 Forever (20分)“Forever number” is a positive integer A with K digits, satisfying the following constrains:the sum of all the digits of A is m;the sum of all the digits of A+1 is n; andthe great...原创 2020-02-21 21:10:57 · 318 阅读 · 0 评论 -
PAT甲 7-4 Cartesian Tree (30分) 两种解法
7-4 Cartesian Tree (30分)A Cartesian tree is a binary tree constructed from a sequence of distinct numbers. The tree is heap-ordered, and an inorder traversal returns the original sequence. For exampl...原创 2020-02-19 18:03:10 · 388 阅读 · 0 评论 -
PAT(甲级)2019年冬季考试 7-3 Summit (25分)
7-3 Summit (25分)A summit (峰会) is a meeting of heads of state or government. Arranging the rest areas for the summit is not a simple job. The ideal arrangement of one area is to invite those heads so ...原创 2020-02-19 17:56:39 · 203 阅读 · 0 评论 -
PAT(甲级)2019年冬季考试 7-2 Block Reversing (25分)
7-2 Block Reversing (25分)Given a singly linked list L. Let us consider every K nodes as a block (if there are less than K nodes at the end of the list, the rest of the nodes are still considered as a...原创 2020-02-19 17:51:29 · 271 阅读 · 0 评论 -
PAT(甲级)2019年冬季考试 7-1 Good in C (20分)
7-1 Good in C (20分)When your interviewer asks you to write “Hello World” using C, can you do as the following figure shows?Input Specification:Each input file contains one test case. For each case...原创 2020-02-19 17:45:20 · 297 阅读 · 0 评论 -
PAT甲级 A1039 Course List for Student
A1039 Course List for Student (25 分)**Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered ...原创 2019-07-17 11:33:41 · 140 阅读 · 0 评论 -
PAT甲级 1102 Invert a Binary Tree
A1102 Invert a Binary Tree (25 分)The following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so f...原创 2019-07-22 16:00:34 · 123 阅读 · 0 评论