摘要:
扩展欧拉定理: $$ a^x \equiv a^{x\mathrm{\ mod\ }\varphi(p) + x \geq \varphi(p) ? \varphi(p) : 0}(\mathrm{\ mod\ }p)$$ cpp include include include using name 阅读全文
摘要:
最小路径覆盖, "看这里" cpp include include include include using namespace std; struct Edge{ int too, nxt, val; }edge[15005]; int n, m, hea[305], ss, tt, uu, v 阅读全文
摘要:
最大权闭合子图 参考 "这" ,胡伯涛论文。 10,8,6,3这个简单割对应的闭合子图是A1,B1,B2 输出路径时,最后一次层次图中,与源点相连的点即选做的实验,与汇点相连的点即选用的仪器。 cpp include include include include using namespace s 阅读全文
摘要:
状压最短路 cpp include include include include using namespace std; struct Node{ int bi1, bi2, fi1, fi2; }nd[105]; int n, m, ww[105], cnt, dis[1050005]; bo 阅读全文
摘要:
源向地球连 月球向汇连 每一天往下一天连 飞船上一天与这一天连 枚举答案 cpp include include include include using namespace std; struct Edge{ int too, nxt, val; }edge[1000005]; int n, m 阅读全文
摘要:
网络流不用动脑子的好爽啊 cpp include include include include using namespace std; int n, uu, hea[105], cnt, ss, tt, sum, minCost, pre[105], dis[105]; const int oo 阅读全文