简介 Library Genesis的Wikipedia条目中的介绍是: Library Genesis or LibGen is a search engine for articles and books on various topics,which allows free access to content that is otherwise paywalled or not digitized elsewhere. Among others it carries PDFs of con
两种解法: 一.树状DP /*by SilverN*/ #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> using namespace std; ; ; int hd[mxn],to[mxn],next[mxn]; int f[mxn],g[mxn],c[mxn]; int vis[mxn]; ; int n,p,e
题目:http://www.joyoi.cn/problem/tyvj-1940 基环树的样子,看了书上的讲解,准备写树上DP,然后挂了: #include<iostream> #include<cstdio> #include<cstring> using namespace std; ,inf=1e9; ],head[MAXN],ct,s[MAXN],h,col[MAXN],cr,rt,ans; int sta[MAXN],top,reg[MAXN]; bool i