zl程序教程

hdu 3998 Sequence

  • HDU 1159 Common Subsequence

    HDU 1159 Common Subsequence

    Common Subsequence Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequen

    日期 2023-06-12 10:48:40     
  • 【30.01%】【hdu 3397】Sequence operation

    【30.01%】【hdu 3397】Sequence operation

    Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7822    Accepted Submission(s): 2347 Problem De

    日期 2023-06-12 10:48:40     
  • 【线段树】HDU 3397 Sequence operation 区间合并

    【线段树】HDU 3397 Sequence operation 区间合并

    操作 Change operations: 0 a b change all characters into '0's in [a , b] 1 a b change all characters into '1's in [a , b] 2 a b change all '0's into '1's and change all '1's into '0's in [a, b] Outpu

    日期 2023-06-12 10:48:40     
  • hdu3415 Max Sum of Max-K-sub-sequence 单调队列

    hdu3415 Max Sum of Max-K-sub-sequence 单调队列

    //hdu3415 Max Sum of Max-K-sub-sequence //单调队列 //首先想到了预处理出前缀和利用s[i] - s[j]表示(j,i]段的和 //之后的问题就转换成了求一个最小的s[j]了,这样就能够单调队列 //求最小值。 //队列中维护的是区间的開始的位置j。我们插入队列中的是j-1,由于 //这个时候s[i] - s[j-1]刚好就是[j,i]段闭区间的和

    日期 2023-06-12 10:48:40     
  • HDU  5063 Operation the Sequence

    HDU 5063 Operation the Sequence

    做题情绪:这个问题开始以为是找规律,一个决定性的悲剧。最后,我意识到应该去反对回归。 解题思路:                 这题的突破口就是要逆向推回去,这样复杂度为 50 * m 的复杂度。做完这题还学到一点就是假设取模的数为素数,能够让指数先对素数减一取模,取模后指数就比較小了。 代码: #incl

    日期 2023-06-12 10:48:40