随笔分类 - solution
题解
摘要:problem 求有多少个单调递增的整数数列,使得相邻两项对三取模的余数不相同。值域为 $[0,m]$,长度为 $n$。$n,m\leq 10^7$。 solution 考虑差分数组 $b_i=a_i-a_{i-1}$,将问题转换成: $b_1\geq 0$. $b_i>0\quad(i>1)$.
阅读全文
摘要:posted on 2022-07-26 15:03:06 | under 学术 | source 太难所以要写,我太菜了。 斜率优化 problem 形如 \[f_i=\min/\max\limits_{1\leq j<i}\{{f_j-a_i\cdot c_j}\}+d_i \]的式子可以被斜率
阅读全文
摘要:posted on 2022-05-28 12:02:29 | under 题解 | source 感谢 vjudge.net 提供技术支持。 https://vjudge.net/contest/497115#overview CF771A Bear and Friendship Conditio
阅读全文