摘要:
「蒲公英」是树上的一个连通子集,有且仅有一个「中心点」,另外: 设「中心点」在原树中的度为 k≥3,则必须有k-1个结点在「蒲公英」中是一个单点,剩下一条链;那条链的本身长度(不包含u)必须不少于2。 两个「蒲公英」本质不同,当且仅当中心点 u 不同或对应的链包含的结点不同。(至少存在一个结点 v 阅读全文
摘要:
#include <iostream> #include <cstring> #include <algorithm> #include <unordered_set> using namespace std; const int N = 110, M = 10010; int n, k; int 阅读全文
摘要:
1:如果a、b小于2000:可以预处理 #include<iostream> using namespace std; const int maxn = 2010; const int mod = 1e9 + 7; int c[maxn][maxn]; void init() { int n = 2 阅读全文