摘要:
卡特兰数高精度。View Code 1 /* 2 Author:Zhaofa Fang 3 Lang:C++ 4 */ 5 #include <cstdio> 6 #include <cstdlib> 7 #include <sstream> 8 #include <iostream> 9 #include <cmath>10 #include <cstring>11 #include <algorithm>12 #include <string>13 #include <utility> 阅读全文
摘要:
poj这题数据很水很容易过,然而hdu的这题可能是因为case太多O(125*125*n)的复杂度TLE,最后用了快速幂的方法优化到O(125*125*logn)过了。140MS。View Code 1 /* 2 Author:Zhaofa Fang 3 Lang:C++ 4 */ 5 #include <cstdio> 6 #include <cstdlib> 7 #include <sstream> 8 #include <iostream> 9 #include <cmath> 10 #include <cstring&g 阅读全文