From f95eb22d9fde83f4f9c8c4e545acc08b2f151e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Tue, 9 Jan 2024 13:53:23 +0800 Subject: [PATCH] 'commit' --- TangDou/Topic/HuanGenDp/{CF1406.cpp => CF1406C.cpp} | 10 +++++++++- TangDou/Topic/HuanGenDp/CF1406C.in | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) rename TangDou/Topic/HuanGenDp/{CF1406.cpp => CF1406C.cpp} (92%) create mode 100644 TangDou/Topic/HuanGenDp/CF1406C.in diff --git a/TangDou/Topic/HuanGenDp/CF1406.cpp b/TangDou/Topic/HuanGenDp/CF1406C.cpp similarity index 92% rename from TangDou/Topic/HuanGenDp/CF1406.cpp rename to TangDou/Topic/HuanGenDp/CF1406C.cpp index 6560d67..7774d1b 100644 --- a/TangDou/Topic/HuanGenDp/CF1406.cpp +++ b/TangDou/Topic/HuanGenDp/CF1406C.cpp @@ -31,8 +31,16 @@ void dfs(int u, int fa) { son[u] = max(son[u], n - sz[u]); if ((son[u] << 1) <= n) r2 = r1, r1 = u; } - +/* +1 2 +1 2 +1 3 +2 3 +*/ signed main() { +#ifndef ONLINE_JUDGE + freopen("CF1406C.in", "r", stdin); +#endif int T; cin >> T; while (T--) { diff --git a/TangDou/Topic/HuanGenDp/CF1406C.in b/TangDou/Topic/HuanGenDp/CF1406C.in new file mode 100644 index 0000000..a0de3a0 --- /dev/null +++ b/TangDou/Topic/HuanGenDp/CF1406C.in @@ -0,0 +1,12 @@ +2 +5 +1 2 +1 3 +2 4 +2 5 +6 +1 2 +1 3 +1 4 +2 5 +2 6