摘要:
从1~n构造显然平衡数最大,先尽可能1~i构造,再补一个数填平或者不补,再用大数把数字补全。 1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 int a[5007]; 5 int ma 阅读全文
posted @ 2020-03-04 18:20
sewage
阅读(244)
评论(0)
推荐(0)
摘要:
每次查询两个叶子结点并把他们从树上删除,最终返回的答案就是根节点。 1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 vector<int>v[1007]; 5 int dep[1007 阅读全文
posted @ 2020-03-04 17:38
sewage
阅读(203)
评论(0)
推荐(0)

浙公网安备 33010602011771号