摘要:
```cpp include include define MAX 500005 int d[MAX],fa[MAX],size[MAX],top[MAX],son[MAX]; int N,M,S,tot=0; int head[MAX]; struct edge{ int v,next; }G[M 阅读全文
摘要:
"友链" Description Examples input output Solution 两两算出LCA,有两个LCA是相同的,选择另一个作为答案 这道题似乎卡常数 cpp include include include define MAXN 500005 int head[MAXN]; i 阅读全文
摘要:
"友链" Description Alice likes snow a lot! Unfortunately, this year's winter is already over, and she can't expect to have any more of it. Bob has thus 阅读全文
摘要:
"洛谷P1250 种树 链接" "POJ1201 Intervals 链接" 差分约束,取最长路。 注意隐藏条件:因为对于第i个点有选择和不选择两种情况,所以$0 include include define MAXN 50005 define N 50005 int dis[MAXN],vis[M 阅读全文
摘要:
"首先先奉上一篇博客" "然后奉上洛谷模板题" 单模数 (80) cpp include include include define mod 19260817 define MAXN 10005 define base 131 char str[1505]; unsigned long long 阅读全文