摘要: 板子题: https://www.luogu.com.cn/problem/UVA11174 分析 整个图形成了一片森林,我们记一棵树(根节点记为 \(root\))的排序方案数为 \(f[root]\)。 我们记 \(root\) 以下的子节点(即它们的父节点为 \(root\))为 \(c_1, 阅读全文
posted @ 2021-07-30 17:37 HinanawiTenshi 阅读(169) 评论(0) 推荐(1) 编辑
摘要: A 发现长度为 $2$ 的一定是最好的。 #pragma GCC optimize("O3") #include<bits/stdc++.h> using namespace std; #define endl '\n' #define debug(x) cerr << #x << ": " << 阅读全文
posted @ 2021-07-30 11:39 HinanawiTenshi 阅读(48) 评论(0) 推荐(0) 编辑