pat考试

paeamecium17 小时前
数据结构·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
paeamecium1 天前
数据结构·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.
paeamecium2 天前
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
paeamecium8 天前
数据结构·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.
paeamecium10 天前
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.
paeamecium19 天前
数据结构·算法·pat考试·pat
【PAT甲级真题】- Recover the Smallest Number (30)Recover the Smallest Number (30) 这是牛客上面最后的一个题了,之后会去写 PTA 上面的题
paeamecium21 天前
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 个月前
数据结构·算法·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)这题几乎一致,只是一个是单步堆排,一个是单步归并
paeamecium1 个月前
数据结构·c++·算法·pat考试
【PAT甲级真题】- Longest Symmetric String (25)Longest Symmetric String (25)Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given “Is PAT&TAP symmetric?”, the longest symmetric sub-string is “s PAT&TAP s”, hence you must output 11.
paeamecium1 个月前
数据结构·c++·算法·pat考试
【PAT】 - Course List for Student (25)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 course list for each student who comes for a query
paeamecium2 个月前
数据结构·c++·算法·pat考试·pat
【PAT甲级真题】- Linked List Sorting (25)Linked List Sorting (25)题目描述点击链接自行查看注意点:一开始还在想写一个静态链表的归并排序 然后发现合并的时候不知道怎么复制。。。 后面反应过来发现好像根本不用自己写
paeamecium2 个月前
数据结构·c++·算法·list·pat考试
【PAT甲级真题】- Student List for Course (25)Student List for Course (25)](https://www.nowcoder.com/pat/5/problem/4086)
1231566802 个月前
c语言·数据结构·算法·pat考试
PAT 1017 A除以B本题要求计算 A/B,其中 A 是不超过 1000 位的正整数,B 是 1 位正整数。你需要输出商数 Q 和余数 R,使得 A=B×Q+R 成立。
剪一朵云爱着5 个月前
算法·pat考试
PAT 1095 Cars on Campus这一题的大意是说给出N条记录,这N条记录里面有进入停车场的也有出停车场的,现在我们要做的是给出K条询问,问在某一个时刻,有多少辆车在这个停车场中,在一天内停在停车场中时间最长的车牌号是多少,如果有多个,按照车牌号从小到大输出。 在这一题中给出的记录是不按照时间顺序的,而题目要求必须保证一条进入的记录和一条出去的记录相匹配,如果不存在相匹配的记录,那么这个记录就该被忽略, 因此如何确定哪些记录是相匹配的是第一要务。 我们可以通过进行自定义排序,先按照车牌大小排序,再按照时间大小排序这样我们就把同一辆车的相近
准女婿_5 个月前
pat考试
优考试局域网系统V6.0.0机构版keyGen优考试局域网系统迎来V6.0.0版本更新,核心在于提升功能性能与优化操作体验。重点对学情分析、移动端考试支持、考试监控和答题体验等方面进行了实用性更新,进一步提升了局域网环境下考试系统的灵活性与管理效率。
剪一朵云爱着5 个月前
算法·pat考试
PAT 1056 Mice and Rice这一题的大意是说Np个老鼠参加比赛,相邻Ng个分成一组进行选拔,每组中选择最重的老鼠晋级,没有晋级的老鼠的排名一个样,按照这种思路给所有的老鼠进行排名,如果最后剩下不足Ng个仍可以分成一组,排名是跟分组个数相关。 这一题最开始我不理解的就是怎么确定排名,后来才明白,先算出当前的组数,然后排名等于组数+1,用测试样例验证是符合的。我们可以采用队列按照题目要求的顺序来保存老鼠的体重和索引,然后对一个个出队,在出队的过程中,我们找最大的体重和与之对应的索引,同时给老鼠排名,每Ng个我们把这Ng个中最重的老师,保