摘要: 历届试题 连号区间数 时间限制:1.0s 内存限制:256.0MB问题描述小明这些天一直在思考这样一个奇怪而有趣的问题:在1~N的某个全排列中有多少个连号区间呢?这里所说的连号区间的定义是:如果区间[L, R] 里的所有元素(即此排列的第L个到第R个元素)递增排序后能得到一个长度为R-L+1的“... 阅读全文
posted @ 2016-01-04 17:24 handsomecui 阅读(1503) 评论(0) 推荐(0) 编辑
摘要: 历届试题 错误票据 时间限制:1.0s 内存限制:256.0MB问题描述某涉密单位下发了某种票据,并要在年终全部收回。每张票据有唯一的ID号。全年所有票据的ID号是连续的,但ID的开始数码是随机选定的。因为工作人员疏忽,在录入ID号的时候发生了一处错误,造成了某个ID断号,另外一个ID重号。你的... 阅读全文
posted @ 2016-01-04 17:00 handsomecui 阅读(516) 评论(0) 推荐(0) 编辑
摘要: UVA - 10129Play on WordsSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solveit to open that doors.... 阅读全文
posted @ 2016-01-04 15:32 handsomecui 阅读(403) 评论(0) 推荐(0) 编辑
摘要: Ordering Tasks John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task isonly possible if other tasks have 阅读全文
posted @ 2016-01-04 14:31 handsomecui 阅读(1253) 评论(0) 推荐(0) 编辑
摘要: UVA - 1103Ancient MessagesIn order to understand early civilizations, archaeologists often study texts written in ancient languages.One such language,... 阅读全文
posted @ 2016-01-04 11:27 handsomecui 阅读(650) 评论(0) 推荐(0) 编辑