5461专题

hdu 5461 Largest Point

Given the sequence A  A with n  n integers t 1 ,t 2 ,⋯,t n   t1,t2,⋯,tn. Given the integral coefficients a  a and b  b. The fact that select two elements t i   ti and t j   tj of A

【AcWing第140场周赛】AcWing 5461. 判断序列(A题)

文章目录 一、题目1、原题链接2、题目描述 二、解题报告1、思路分析2、时间复杂度3、代码详解 一、题目 1、原题链接 5461. 判断序列 2、题目描述 二、解题报告 1、思路分析 按照题目要求模拟即可。具体过程:设置一个变量来记录是否满足题目要求,检查是否满足要求:从序列第二项开始,依次判断枚举到的项的值是否与其前一项的差值为1,若出现不为1的情况