Game of Connections
Game of Connections 这个题也是直接求 卡特兰数 ,不过数据有一点大,不能够直接求,因为杭电不能交 python 不然我就用 python 写了.... 对于这么大的数据,还不能写 python 就只能用 高精度 啦 代码: // Created by CAD on 2019/8/15. #include <bits/stdc++.h> #define mst(name, value) memset(name,value,sizeof(name)) using namespace std; using ll=long long; struct BigInt { const static int mod=1e4; const static int blo=4; int a[600], len; BigInt() { mst(a, 0), len=1; } BigInt(int v) //用int初始化 { mst(a, 0); len=0; do { a[len++]=v%mod; v/=mod; } while (v); } BigInt operator+(const BigInt &b) const //重载加法运算符 { BigInt res; res.len=max(len, b.len); for (int i=0; i<=res.len; ++i)