
PAT
文章平均质量分 84
南宫萧幕
这个作者很懒,什么都没留下…
展开
-
PAT甲级1101~1125
PAT甲级1101~11251101 Quick Sort (25 分)1101 Quick Sort (25 分)There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are moved to i原创 2022-02-27 16:49:31 · 136 阅读 · 0 评论 -
PAT甲级题目及解析及代码
PAT甲级题目及解析及代码leetcode面向于找工作,性价比更高,论坛成熟题解丰富,用户体验好;leetcode题目有中文,而pat甲级为英文,需要有读英文题的习惯;pat甲级算法难度绝大多数处于leetcode简单和中等级别,但leetcode只需编写解题所需的关键方法,而pat甲级需要编写包括输入、处理、输出的全流程,再加之leetcode会提供具体出错的测试数据,而pat只告知有错却不提供具体测试数据,大大增加了debug难度,做起来不比leetcode简单中等级别的轻松。pat甲级适合什么样的原创 2022-02-22 21:08:13 · 535 阅读 · 0 评论 -
PAT甲级1076~1100
PAT甲级1076~11001076 Forwards on Weibo (30 分)1077 Kuchiguse (20 分)1078 Hashing (25 分)1079 Total Sales of Supply Chain (25 分)1080 Graduate Admission (30 分)1081 Rational Sum (20 分)1082 Read Number in Chinese (25 分)1083 List Grades (25 分)1084 Broken Keyboard (2原创 2022-02-22 21:01:13 · 1027 阅读 · 0 评论 -
PAT甲级1051~1075
PAT甲级1051~10751051 Pop Sequence (25 分)1052 Linked List Sorting (25 分)1053 Path of Equal Weight (30 分)1054 The Dominant Color (20 分)1055 The World's Richest (25 分)1056 Mice and Rice (25 分)1057 Stack (30 分)1058 A+B in Hogwarts (20 分)1059 Prime Factors (25 分)原创 2022-02-22 20:59:48 · 537 阅读 · 0 评论 -
PAT甲级1026~1050
PAT甲级1026~10501026 Table Tennis (30 分)1027 Colors in Mars (20 分)1028 List Sorting (25 分)1029 Median (25 分)1030 Travel Plan (30 分)1031 Hello World for U (20 分)1032 Sharing (25 分)1033 To Fill or Not to Fill (25 分)1034 Head of a Gang (30 分)1035 Password (20 分原创 2022-02-22 20:58:31 · 241 阅读 · 0 评论 -
PAT甲级1001~1025
pat甲级真题练习1001~1156原创 2022-01-15 18:23:13 · 974 阅读 · 0 评论 -
PAT (中文)1008 数组元素循环右移问题
题目一个数组A中存有N(>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将A中的数据由(A0 A1 ⋯AN−1)变换为(AN−M ⋯AN−1A0A1⋯AN−M−1)(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法?输入格式:每个输入包含一个测试用例,第1行输入N(1≤N≤100)和M(≥0);第2行输入N个整数,之间用空格分隔。输出格式:在一行中输出循环右移M位以后的整数序列,之间用空格分隔,序列结尾不原创 2020-08-17 20:07:54 · 159 阅读 · 0 评论