首页 > TAG信息列表 > CF1580F

CF1580F Problems for Codeforces 【生成函数,组合计数】

给定正整数 \(n,m\),求有多少个正整数序列 \(a_1,\cdots,a_n\) 使得 \(a_i+a_{i+1}<m\) 且 \(a_1+a_n<m\),答案对 \(998\,244\,353\) 取模。 \(n\le 5\cdot 10^4\),\(m\le 10^9\)。 先看 \(n\) 是偶数的情况:当 \(i\) 为奇数时把 \(a_i\) 改为 \(m-1-a_i\),条件变为 \(a_1\le a_2\ge