摘要:
阅读全文
摘要:
整型溢出:信息学竞赛的发展,繁荣与衰退 二分图最小点覆盖包含的点数等于二分图最大匹配包含的边数。证明: 因为最大匹配是原二分图边集的一个子集,并且所有的边都不相交,所以需要从每条匹配边中选出一个端点。因此,最小点覆盖包含的点数不可能小于最大匹配包含的边数。如果能对任意二分图构造出一组点覆盖,其包 阅读全文
摘要:
探索一门学问有三个层次:求其解,知其原因,究其思维之本。通俗地讲,就是“怎么做” “为什么是对的” “怎样才能想到怎么去做”。在计算机科学中,前两者分别对应算法的步骤和证明。而长久以来,后者时常与“天赋”一词相关联。在全面讲解算法与数据结构知识点的同时,致力于模型构建与思路分析,帮助我们厘清思维过程 阅读全文
摘要:
CF3A Shortest path of the king Luogu题地址 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> using namespace 阅读全文
摘要:
P3378 【模板】堆 #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int N = 1e6; int h[N], s; void up(int u) { while(u / 2 阅读全文
摘要:
P3375 【模板】KMP字符串匹配 #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int N =1e6 + 10; char s[N], p[N]; int ne[N]; in 阅读全文
摘要:
P3366 【模板】最小生成树 //prim算法求最小生成树#include <iostream> #include <cstring> using namespace std; const int N = 5010, INF = 0x3f3f3f3f; int n, m, d[N], g[N][N 阅读全文