
字符串
文章平均质量分 70
ryo_218
要努力成为别人的依赖呀!
展开
-
第四届蓝桥杯省赛C++B组 错误票据
标题:错误票据某涉密单位下发了某种票据,并要在年终全部收回。每张票据有唯一的ID号。全年所有票据的ID号是连续的,但ID的开始数码是随机选定的。因为工作人员疏忽,在录入ID号的时候发生了一处错误,造成了某个ID断号,另外一个ID重号。你的任务是通过编程,找出断号的ID和重号的ID。假设断号不可能发生在最大和最小号。要求程序首先输入一个整数N(N<100)表示后面数据行数。接着读...原创 2018-03-27 19:39:18 · 1135 阅读 · 2 评论 -
PAT 1152 Google Recruitment (20)
1152 Google Recruitment (20 分)In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is super-simple, a URL co...原创 2019-03-01 17:56:57 · 215 阅读 · 0 评论 -
PAT 1045 Favorite Color Stripe (30)
1045 Favorite Color Stripe (30)(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 unwante...原创 2018-09-05 13:27:18 · 151 阅读 · 0 评论 -
PAT 1040 Longest Symmetric String (25)
1040 Longest Symmetric String (25)(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...原创 2018-09-04 20:56:03 · 148 阅读 · 0 评论 -
PAT 1038 Recover the Smallest Number (30)
1038 Recover the Smallest Number (30)(30 分)Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we can re...原创 2018-09-04 19:01:55 · 137 阅读 · 0 评论 -
PAT 1084 Broken Keyboard (20)
1084 Broken Keyboard (20)(20 分)On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given ...原创 2018-08-17 12:49:45 · 156 阅读 · 0 评论 -
PAT 1073 Scientific Notation (20)
1073 Scientific Notation (20)(20 分)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9]"."[0-9...原创 2018-08-08 15:33:02 · 153 阅读 · 0 评论 -
PAT 1024 Palindromic Number (25)
1024 Palindromic Number (25)(25 分)A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single d...原创 2018-08-17 21:48:31 · 168 阅读 · 0 评论 -
PAT 1001 A+B Format (20)
1001 A+B Format (20)(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).Inp...原创 2018-08-09 21:09:53 · 121 阅读 · 0 评论 -
PAT 1077 Kuchiguse (20)
1077 Kuchiguse (20)(20 分)The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. S...原创 2018-08-09 16:13:51 · 152 阅读 · 0 评论 -
第七届蓝桥杯省赛C++A组 密码脱落
密码脱落X星球的考古学家发现了一批古代留下来的密码。这些密码是由A、B、C、D 四种植物的种子串成的序列。仔细分析发现,这些密码串当初应该是前后对称的(也就是我们说的镜像串)。由于年代久远,其中许多种子脱落了,因而可能会失去镜像的特征。你的任务是:给定一个现在看到的密码串,计算一下从当初的状态,它要至少脱落多少个种子,才可能会变成现在的样子。输入一行,表示现在看到的密码串(长度不大...原创 2018-03-23 13:15:35 · 802 阅读 · 6 评论 -
第六届蓝桥杯国赛C++B组 密文搜索
标题:密文搜索福尔摩斯从X星收到一份资料,全部是小写字母组成。他的助手提供了另一份资料:许多长度为8的密码列表。福尔摩斯发现,这些密码是被打乱后隐藏在先前那份资料中的。请你编写一个程序,从第一份资料中搜索可能隐藏密码的位置。要考虑密码的所有排列可能性。数据格式:输入第一行:一个字符串s,全部由小写字母组成,长度小于1024*1024紧接着一行是一个整数n,表示以下有n行密码,...原创 2019-05-11 16:32:22 · 448 阅读 · 0 评论