模板
吃灰狼的小红帽
放飞理想的有志青年。
展开
-
c++ BigInteger模板 非常好的板子
转一手非常好的BigInteger板子,虽然我也没太看懂,但经过无脑套用,还是很好用的。#include #include #include using namespace std; struct BigInteger{ int A[25]; enum{MOD = 10000}; BigInteger(){memset(A, 0,转载 2017-05-18 16:25:20 · 736 阅读 · 0 评论 -
二分图匹配 板子(匈牙利&HK)
仅仅是板子。HK:#include#include#include#include#includeusing namespace std;#define INF 1<<30;const int maxed=1000+10;bool used[maxed];int n,m,ma[maxed],mb[maxed],Ma[maxed],Mb[maxed],dis;vect原创 2017-07-18 12:13:18 · 322 阅读 · 0 评论 -
矩阵快速幂+倍增法(纯模板)
Mat power(Mat M,int P){ Mat tot(1); while (P){ if (P&1) tot=tot*M; P>>=1,M=M*M; } return tot;}Mat count(Mat M,int P){ Mat M0,E(1),M1=E; while (P){原创 2017-07-27 23:44:06 · 325 阅读 · 0 评论