![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pat甲级
WindSearcher
打造自己的梦想,否则就被雇佣打造他人的梦想!
展开
-
PAT 1093 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.Now given any string, you are supposed to tell the number of原创 2020-08-13 20:38:24 · 229 阅读 · 0 评论 -
PAT 1045 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 favorite color stripe.It is said原创 2020-08-05 10:01:27 · 265 阅读 · 0 评论 -
PAT 1105 Spiral Matrix (25分)
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-08-04 10:17:11 · 214 阅读 · 0 评论 -
PAT 1017 Queueing at Bank (25分)
Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow line, until it is his/her turn to be served and there is a原创 2020-08-02 14:17:38 · 156 阅读 · 0 评论 -
1003 Emergency (25分)
原题链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805523835109376题意求最短路有多少条,其中经过救援队最多的数量是多少。思路:如何计算最短路有多少条?并且经过的最短路中救援队伍最多?dijkstra是通过已知子集中的元素去找和子集元素最近的一条,并把该点加入子集,然后通过该点到达目的地更近还是直接到达更近。所以我们能做的就是判断这个中间点k和目的地j。第一种情况是dis[j] == dis[k]+e[k原创 2020-07-22 15:27:00 · 116 阅读 · 0 评论 -
1013 Battle Over Cities
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other highways to keep the rest of the c原创 2020-06-10 23:10:38 · 171 阅读 · 0 评论 -
1006 Sign In and Sign Out (25 分)
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you...原创 2019-11-14 14:19:29 · 109 阅读 · 0 评论 -
1001 A+B Format (20 分)
Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input ...原创 2019-10-29 15:31:29 · 120 阅读 · 0 评论