Problem Description Calculate A * B. Input Each line will contain two integers A and B. Process to end of file. Note: the length of each integer will not exceed 50000. Output For each case, output A * B in one line. Sample Input 1 2 1000 2 Sample Out…
题目分析: 容易想到生成函数的构造方法. 令g(n)表示n个点的无向图个数,f(n)表示n个点的无向连通图的个数.式子是显然的. 容易发现式子是卷积的形式,写出生成函数,然后多项式求逆后多项式乘法即可. 代码: #include<bits/stdc++.h> using namespace std; int n; ; ; ; int A[maxn],B[maxn],IB[maxn],B0[maxn],F[maxn]; ],ord[maxn]; int fast_pow(int now,long…