由两个有限项的等差数列B, C, 求有多少个有限项的等差数列A,满足C是A, B的所有公共项,若有无穷个A满足条件,输出-1
题目思路:#includeusingnamespacestd;#defineintlonglong#definepbpush_backconstintmaxn=1e6+5,inf=1e9+5,maxm=4e4+5,mod=1e9+7,N=1e6;//inta[maxn],b[maxn];intn,m;strings;intqpow(inta,intb){intres=1;while(b){if(b