【codeforces 1174E】Ehab and the Expected GCD Problem
题目描述
社论
editorial:社论
考虑到第一个数应该是 $2^x3^y$ 形式,就可以设 $f_{i,x,y}$ 表示前 $i$ 个数的 $\gcd$ 为 $1$ 且不同种类是最大值的方案数
转移就分类讨论是否减小
太多了不想写了
editorial:社论
考虑到第一个数应该是 $2^x3^y$ 形式,就可以设 $f_{i,x,y}$ 表示前 $i$ 个数的 $\gcd$ 为 $1$ 且不同种类是最大值的方案数
转移就分类讨论是否减小
太多了不想写了