【题解】[牛客OI周赛4-提高组]A.K小生成树 枚举+前缀和+剪枝

题目链接 #include<cstdio> #include<algorithm> using namespace std; const int N=1e6+10,Q=1e4+10,INF=0x3f3f3f3f; int n,m,a[N],fa[21],l,r,f1,f2,ans,tot,flag,q,askl[Q],askr[Q],minl=INF,maxr=-INF; struct Edge{
相关文章
相关标签/搜索