摘要:
题目大意:删去k条边,树变为相等个点的连通分量,求所有正整数k。 解题关键:树dp,不必求因子。 阅读全文
摘要:
解题关键:KMP算法中NEXT数组的理解。 阅读全文
摘要:
#include #include #include #include #include #include #define eps 1e-8 using namespace std; typedef long long ll; int sgn(double x){ if(fabs(x)operator&(const Line &b)const{ Point res=s; ... 阅读全文
摘要:
#include #include #include #include #include #include #define inf 0x3f3f3f3f #define maxn 100006 using namespace std; typedef long long ll; int cost[6][6]={ 0,6,inf,8,inf,inf, 18,0,7,inf,inf,... 阅读全文
摘要:
题目大意:求凸包面积。 解题关键:模板题,叉积求面积。 这里的cmp函数需要调试一下,虽然也对,与普通的思考方式不同。 阅读全文