[最新整理合集]PAT甲级(Advanced Level) 题解汇总(个人刷题史汇总)

以下为笔者的刷题漫漫心路,是笔者立志刷完PAT(Advanced Level)的一个见证,也是一个题解代码汇总贴。

以下代码均为笔者自写,有些题解和思路可能不是最优解,望读者轻喷。欢迎指出代码逻辑或者细节错误和笔者共同交流。

希望读者仔细食用。也能和读者共同进步成长!

PAT (Advanced Level) Practice个人题解目录


题号

题目

代码传送门

算法思路

1001

A+B Format (20)

 C++

字符串+模拟

1002

A+B for Polynomials (25)

 C++

模拟

1003

Emergency (25)

 C++ 

Dijkstrla

 1004 

Counting Leaves (30)

 C++

DFS

 1005 

Spell It Right (25)

 C++

模拟

1006

 Sign In and Sign Out (25)

 C++

模拟

1007

Maximum Subsequence Sum (25)

C++

线性DP

1008

Elevator (20)

C++

模拟

1009

Product of Polynomials (25)

C++

模拟

1010

Radix (25)

C++

二分

1011

World Cup Betting (20)

C++

模拟

1012

The Best Rank (25)

C++

模拟

1013

 Battle Over Cities (25)

C++

并查集

1015

Reversible Primes (20)

C++

素数+模拟

1018

Public Bike Management (30)

C++

Dijkstrla+DFS

1019

General Palindromic Number (20)

C++

回文串

1020

Tree Traversals (25)

C++

树的遍历

1021

Deepest Root (25)

C++

DFS

1022

Digital Library (30)

C++

STL+哈希

1023

Have Fun with Numbers (20)

C++

高精度

1024

Palindromic Number (25)

C++

高精度+回文串

1025

PAT Ranking (25)

C++

模拟

1027

Colors in Mars (20)

C++

字符串

1028

List Sorting (25)

C++

STL

1029

Median(25)

C++

STL

1030

Travel Plan (30)

C++

Dijkstrla

1031

Hello World for U (20)

C++

字符串+模拟

1032

Sharing (25)

C++

链表

1033

To Fill or Not to Fill (25)

C++

贪心

1034

Head of a Gang (30)

C++

并查集

1035

Password (20)

C++

模拟

1036

Boys vs Girls (25)

C++

STL+哈希

1037

Magic Coupon (25)

C++

贪心

1038

Recover the Smallest Number (30)

C++

贪心

1039

Course List for Student (25)

C++

STL+哈希

1040

Longest Symmetric String (25)

C++

Manacher

1041

Be Unique (20)

C++

STL

1042

Shuffling Machine (20)

C++

模拟

1043

Is It a Binary Search Tree (25)

C++

二叉排序树

1044

Shopping in Mars (25)

C++

前缀和+双指针

1045

Favorite Color Stripe (30)

C++

线性DP

1046

Shortest Distance (20)

C++

前缀和

1047

Student List for Course (25)

C++

STL+哈希

1048

Find Coins (25)

C++

双指针

1049

Counting Ones (30)

C++

数位DP

1050

String Subtraction (20)

C++

字符串

1051

Pop Sequence (25)

C++

1052

Linked List Sorting (25)

C++

链表

1053

Path of Equal Weight(30)

C++

DFS

1054

The Dominant Color (20)

C++

STL

1055

The World‘s Richest (25)

C++

结构体排序

1057

Stack (30)

C++

树状数组+二分+栈

1058

A+B in Hogwarts (20)

C++

模拟

1059

Prime Factors (25)

C++

埃氏筛+约数分解

1062

Talent and Virtue (25)

C++

结构体排序

1063

Set Similarity (25)

C++

STL

1064

Complete Binary Search Tree (30)

C++

二叉排序树

1065

A+B and C (64bit) (20)

C++

溢出处理

1066

Root of AVL Tree (25)

C++

平衡二叉树

1067

Sort with Swap(0, i) (25)

C++

贪心

1068

Find More Coins (30)

C++

DP+背包路径

1069

The Black Hole of Numbers (20)

C++

思维+模拟

1070

Mooncake (25)

C++

贪心

1071

Speech Patterns (25)

C++

字符串

1072

Gas Station (30)

C++

Dijkstrla

1091

Acute Stroke (30)

C++

Flood Fill


版权声明:本文为NHS6671原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。