摘要:
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 5e5 + 9; ll n, m, root; ll a[N]; struct segmentTree { struct node { 阅读全文
摘要:
题目链接 题解:想到了菊花图,没想到最值就是一棵树,然后是菊花图,然后要让合法点对减少的操作,就是给两个叶子连边,这样就删除了。 代码: #include <iostream> #include <algorithm> using namespace std; typedef long long l 阅读全文