文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1040 Longest Symmetric String

1040 Longest Symmetric StringGiven 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 ....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1044 Shopping in Mars

1044 Shopping in MarsShopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M).Whenmakingthepayment,thechaincanbecutatany....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1117 Eddington Number

1117 Eddington NumberBritish astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an “Eddington number”, E – that is, the maximum integer E s....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1057 Stack

1057 StackStack 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 posit....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1055 The World‘s Richest

1055 The World’s RichestForbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but conc....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1051 Pop Sequence

1051 Pop SequenceGiven a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible p....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1148 Werewolf - Simple Version

1148 Werewolf - Simple VersionWerewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: “Player #2 is ....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1091 Acute Stroke

1091 Acute StrokeOne important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice....

【PAT甲级 - C++题解】1091 Acute Stroke
文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1085 Perfect Sequence

1085 Perfect SequenceGiven a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the maximum and minimum numbers in ....

文章 2023-06-19 来自:开发者社区

【PAT甲级 - C++题解】1046 Shortest Distance

1046 Shortest DistanceThe task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Ea....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

开发与运维

集结各类场景实战经验,助你开发运维畅行无忧

+关注