pat

paeamecium5 天前
c++·算法·pat考试·pat
【PAT甲级真题】- A+B in HogwartsA+B in Hogwarts - 牛客 A+B in Hogwarts - PTAIf you are a fan of Harry Potter, you would know the world of magic has its own currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it’s eas
paeamecium9 天前
数据结构·c++·算法·pat考试·pat
【PAT甲级真题】- String Subtraction (20)String Subtraction - PTA String Subtraction - 牛客Given two strings S 1 S_1 S1and S 2 , S = S 1 − S 2 S_2,S=S_1−S_2 S2,S=S1−S2is defined to be the remaining string after taking all the characters in S 2 S_2 S2from S 1 S_1 S1. Your task is simply to calculat
paeamecium9 天前
数据结构·c++·算法·pat考试·pat
【PAT甲级真题】- Shortest Distance (20)Shortest Distance - PTA Shortest Distance - 牛客The task is really simple: given N N N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.
paeamecium10 天前
c++·算法·pat考试·pat
【PAT甲级真题】- Shuffling Machine (20)Shuffling Machine - PTA Shuffling Machine - 牛客Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where employees collaborate with gamblers by perf
paeamecium16 天前
数据结构·c++·算法·pat考试·pat
【PAT甲级真题】- General Palindromic Number(20)General Palindromic Number注意点:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 1234321 1234321 is a palindromic number. All single digit numbers are palindromic numbers.
paeamecium18 天前
c++·pat考试·pat
【PAT甲级真题】- Spell It Right(20)Spell It Right题目描述点击链接自行查看注意点:Given a non-negative integer N N N, your task is to compute the sum of all the digits of N N N, and output every digit of the sum in English.
多思考少编码25 天前
c++·python·最短路·pat·算法竞赛
PAT甲级真题1001 - 1005题详细题解(C++)(个人题解)本文为PAT甲级真题中的1001 - 1005题的详细题解,本文的解法仅个人的思路和解法,有什么更优解欢迎讨论(AI一键生成答案的年代还能坚持写题解吗?)
paeamecium1 个月前
数据结构·算法·pat考试·pat
【PAT甲级真题】- Recover the Smallest Number (30)Recover the Smallest Number (30) 这是牛客上面最后的一个题了,之后会去写 PTA 上面的题
paeamecium1 个月前
c++·pat考试·pat
【PAT甲级真题】- Table Tennis (30)Table Tennis (30) - PTATable Tennis (30) - 牛客注意点:A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the available
paeamecium1 个月前
数据结构·c++·算法·pat
【PAT甲级真题】- Favorite Color Stripe (30)Favorite Color Stripe (30)注意点Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remaining parts together to form her favo
paeamecium1 个月前
数据结构·算法·pat考试·pat
【PAT甲级真题】- Stack (30)Stack (30)注意点Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the top position) and Pop (deleting the top element). Now you are
paeamecium1 个月前
数据结构·c++·算法·pat考试·pat
【PAT甲级真题】- Cars on Campus (30)Cars on Campus (30)-牛客 Cars on Campus (30)-PTA注意点:Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, you are su
paeamecium1 个月前
数据结构·c++·算法·pat考试·pat
【PAT甲级真题】- All Roads Lead to Rome (30)All Roads Lead to Rome (30)注意点:Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.
paeamecium1 个月前
c++·算法·动态规划·pat考试·pat
【PAT甲级真题】- Count PAT‘s (25)Count PAT’s (25)注意点The string APPAPT contains two PAT’s as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and the 6th characters.
paeamecium1 个月前
数据结构·c++·算法·排序算法·pat考试·pat
【PAT甲级真题】- Insert or Merge (25)Insert or Merge (25)与Insertion or Heap Sort (25)这题几乎一致,只是一个是单步堆排,一个是单步归并
paeamecium2 个月前
数据结构·c++·算法·pat
【PAT甲级真题】- Reversing Linked List (25)Reversing Linked List (25)题目描述点击链接自行查看注意点:Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must output 3→2→1→6→5→4; if K = 4, you must
paeamecium2 个月前
数据结构·c++·算法·pat
【PAT甲级真题】- Talent and Virtue (25)Talent and Virtue (25)About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a “sage(圣人)”; being le
paeamecium2 个月前
数据结构·c++·算法·pat考试·pat
【PAT甲级真题】- Linked List Sorting (25)Linked List Sorting (25)题目描述点击链接自行查看注意点:一开始还在想写一个静态链表的归并排序 然后发现合并的时候不知道怎么复制。。。 后面反应过来发现好像根本不用自己写
橙之夏2 年前
数据结构·算法·pat
2024 秋季PAT认证甲级(题解A1-A4)这一次PAT甲级应该是最近几次最简单的一次了,3个小时的比赛差不多30分钟就ak了(也是拿下了整场比赛的rk1),下面是题解报告,每个题目差不多都是20-30行代码,难度在洛谷普及组左右(cf 1000-1200分)
cwtnice2 年前
pat
PAT 1097 Deduplication on a Linked List(25分)原题链接:PAT 1097 Deduplication on a Linked List(25分)Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value or absolut