随笔分类 - 模板
摘要:SPOJ -Find The Determinant III 参考:https://blog.csdn.net/zhoufenqin/article/details/7779707 参考中还有几个关于行列式的性质。 题意: 计算矩阵的行列式答案 思路: 计算行列式的基本方法就是把矩阵化成上三角或下三
阅读全文
摘要:Surround the Trees:http://acm.hdu.edu.cn/showproblem.php?pid=1392 题意: 在给定点中找到凸包,计算这个凸包的周长。 思路: 这道题找出凸包上的点后,s数组中就是按顺序的点,累加一下距离就是周长了。 #include <algorith
阅读全文
摘要:乘法通用模板: #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <map> #include <set
阅读全文
摘要:今天又加深的理解了KMP 认真看了这篇博客,感觉讲的还ok; 然后带着理解写了洛谷的P3375字符串KMP模板题;
阅读全文
摘要:传送门:http://poj.org/problem?id=1222 题意:开关灯问题,一幅开关的灯中,给出一种操作,使得灯全关掉,(操作一个开关,相邻的灯也会改变) 思路:利用位运算枚举第一行;
阅读全文
摘要:洛谷割点模板:https://www.luogu.org/problemnew/show/P3388 #include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdio> #in
阅读全文
摘要:/* pku3461(Oulipo), hdu1711(Number Sequence) 这个模板 字符串是从0开始的 Next数组是从1开始的 */ #include #include using namespace std; const int N = 1000002; int next[N]; char S[N], T[N]; int slen, tlen; void getN...
阅读全文
摘要:#include #include #include #include using namespace std; const int MAXN = 505; vector Graph[MAXN]; int TopNum[MAXN], NodeNum[MAXN];; int NumVertex, NumEdge; // 有向无环图一定存在拓扑...
阅读全文

浙公网安备 33010602011771号