摘要: 先建树,再BFS #include <bits/stdc++.h> using namespace std; vector<int> tree[35]; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; ve 阅读全文
posted @ 2022-03-15 21:35 Xxaj5 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<vector<int>> v; for (int i 阅读全文
posted @ 2022-03-15 20:29 Xxaj5 阅读(29) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } vector<int> 阅读全文
posted @ 2022-03-15 20:28 Xxaj5 阅读(33) 评论(0) 推荐(0) 编辑