摘要:
"HDU 6218 Bridge" Problem : 给一个2×n的矩阵,一开始矩阵所有相邻点之间有一条边。有其、个询问,每次给出两个相邻的点的坐标,将其中的边删除或者添加,问如此操作之后整张图的割边数量。 , q using namespace std; const int N = 2e5 + 阅读全文
摘要:
"BZOJ3926 诸神眷顾的幻想乡" Problem : 给一个n个节点的树(n using namespace std; const int N = 1e5 15 2; vector eg[N]; int cl[N]; int deg[N]; int n, c; struct Suffix_Au 阅读全文
摘要:
"CERC 2014 Pork barrel" Problem : n个点m条边有边权的无向图,有q个询问,每次询问权值在[L,R]内的边组成的最小生成树的权值和,强制在线。 n include include include include include include include incl 阅读全文
摘要:
"Gym 215177D 母亲节的礼物" Problem : 给n个点m条边的无向图,每个点的度数小于等于7,要求用4种不同的颜色给每个点染色,使得每个点相邻的点中最多只有一个相同颜色的点。(n include include include include include include incl 阅读全文
摘要:
"HDU 6070 Partition" Problem : 给一段长度为n的序列,要求找出一段区间,使得这段区间的数字种类除以区间长度最小。输出最后的答案即可。(n include include include include include include include include in 阅读全文
摘要:
"HDU 4651 Partition" Problem : n的整数划分方案数。(n include include include include include include using namespace std; const int N = 1e5 + 8; const int mo = 阅读全文
摘要:
"HDU 4622 Reincarnation " Problem : 给一个串S(n include using namespace std; const int N = 2008; const int INF = 2000000008; struct suffix_automanon { int 阅读全文