pat刷题笔记
刷题笔记供日后查看
ZhangJinlulu
这个作者很懒,什么都没留下…
展开
-
1107 Social Clusters (30分)-PAT甲级真题
When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A “social cluster” is a set of people who have some of their hobbies in common. You are supposed to find all the原创 2020-06-26 21:02:27 · 227 阅读 · 0 评论 -
1105 Spiral Matrix (25分) -- PAT 甲级
This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in from the first element at the upper-left corner, then move in a clockwise spiral. The matrix has m rows and n columns原创 2020-06-26 17:33:13 · 102 阅读 · 0 评论 -
PAT (Advanced Level 甲级) 1155 Heap Paths (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 value) of P is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) t原创 2020-06-16 15:14:10 · 101 阅读 · 0 评论 -
1048 Find Coins (25分) 散列 C++
1048 Find Coins (25分) Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However, there was a special requirement o原创 2020-05-24 23:02:37 · 190 阅读 · 0 评论 -
1046 Shortest Distance (20分) 简单模拟 c++
The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits. Input Specification: Each input file contains one test case. For each case, the first line contains原创 2020-05-23 22:33:04 · 108 阅读 · 0 评论 -
1012 The Best Rank (25分) 排序 C++
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we encourage students by emphasi原创 2020-05-23 22:06:52 · 118 阅读 · 0 评论