• 2024-01-25F. Sum of Progression
    原题链接题解关键要素:两次后缀和预处理\(d<\sqrt{n}\)的情况,当\(d\)大于\(\sqrt{n}\)时,直接暴力,总时间复杂度为\(O(n\sqrt{n})\)代码比讲述要清晰,请直接看代码code#include<bits/stdc++.h>#definelllonglongusingnamespacestd;lla[100005]={0};llsufs1[100335][
  • 2024-01-22B - Arithmetic Progression Subsequence
    B-ArithmeticProgressionSubsequenceProblemStatementYouaregivenasequence$A$oflength$N$consistingofintegersbetween$1$and$\textbf{10}$,inclusive.Apairofintegers$(l,r)$satisfying$1\leql\leqr\leqN$iscalledagoodpairif
  • 2024-01-16F. Sum of Progression
    F.SumofProgressionYouaregivenanarray$a$of$n$numbers.Therearealso$q$queriesoftheform$s,d,k$.Foreachquery$q$,findthesumofelements$a_s+a_{s+d}\cdot2+\dots+a_{s+d\cdot(k-1)}\cdotk$.Inotherwords,foreach
  • 2024-01-16CF1921F Sum of Progression
    题目链接:CF一道经典的类型题,把这种类型的题拿出来单独说一下。注意到问题中涉及到需要维护\(a_{x+k\timesstep}\)这样的信息,这样的信息很难用树型结构维护,比较容易用块级结构维护,我们注意到其实是每次这种步长\(+step\)的信息很难维护,我们考虑一类特殊的分块:如果\(step\)
  • 2023-08-24Arithmetic Progression 题解
    ArithmeticProgression题目大意存在一个打乱了顺序的等差数列\(a\),你可以询问不超过\(60\)次,每次可以以以下两种方式之一进行询问:查询\(a\)中是否有严格大于\(x\)的数。查询\(a_i\)的值。你需要求出这个等差数列的首项和公差。思路分析比较有意思的题。看
  • 2023-06-061502. Can Make Arithmetic Progression From Sequence
    /***1502.CanMakeArithmeticProgressionFromSequence*https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence/description/*Asequenceofnumbersiscalledanarithmeticprogressionifthedifferencebetweenanytwoconsecut
  • 2023-04-24Codeforces Round #156 (Div. 2) C. Almost Arithmetical Progression dp
    Genalovessequencesofnumbers.Recently,hehasdiscoveredanewtypeofsequenceswhichhecalledanalmostarithmeticalprogression.Asequenceisanalmostarithmeticalprogression,ifitselementscanberepresentedas:a1 = p,wherepissomeintege
  • 2023-04-12UVa 11129 An antiarithmetic permutation (构造题&想法题&分治)
    11129-AnantiarithmeticpermutationTimelimit:3.000secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=113&page=show_problem&problem=2070Apermutationof n+1 isabijectivefunctionoftheinitial n+1
  • 2023-03-22E - Geometric Progression
    E-GeometricProgressionhttps://atcoder.jp/contests/abc293/tasks/abc293_e 思路根据矩阵递推式找出转移矩阵的幂形式。利用矩阵快速幂计算。     
  • 2022-12-17[ARC145] Non Arithmetic Progression Set
    ProblemStatementConstructaset$S$ofintegerssatisfyingalloftheconditionsbelow.Itcanbeprovedthatatleastonesuchset$S$existsundertheConst
  • 2022-10-14[Unit testing RxJS] Test complex logic with time progression syntax
    Forexamplewehaveasearchinput:constinput$=fromEvent(document.getElementById("#input"),"input");input$.pipe(debounceTime(200),pluck("ta
  • 2022-10-11Insert a Progression (观察+贪心贡献, 两两数的绝对值差之和)
    题目大意: 给出一个数组A,然后一个1到x的所有数,让你把这些数插入到A里面,使得插入后的序列ai和ai+1绝对值差的和最小,求出这个最小值即可思路: 要素
  • 2022-10-05Codeforces Round #785 (Div. 2) - D. Lost Arithmetic Progression
    GCDProblem-D-Codeforces题意有2个等差数列A,B,它们公有的项组成新的等差数列C;现在给出B的(首项,公差,项数)=(b,q,y),C的(首项,公差,项数)=(c,r,z)求满足条件的A的数量,如
  • 2022-09-18CF1194A - Remove a Progression
    CF1194A-RemoveaProgressionA.RemoveaProgressionYouhavealistofnumbersfrom\(1\)to\(n\)writtenfromlefttorightontheblackboard.Youperform