上一页 1 ··· 5 6 7 8 9
摘要: 一、堆 #include <bits/stdc++.h> using namespace std; int n; priority_queue < int, vector < int >, greater < int > > heap; signed main () { scanf ("%d", & 阅读全文
posted @ 2023-03-31 16:28 CountingGroup 阅读(20) 评论(0) 推荐(0)
摘要: 1. CF743C - Vladik and fractions (*1500) 目标:给定 $n$,构造 $x,y,z$ 满足 $x \neq y, x \neq z, y \neq z$ 且 $\dfrac{2}{n}=\dfrac{1}{x}+\dfrac{1}{y}+\dfrac{1}{z} 阅读全文
posted @ 2023-03-29 20:26 CountingGroup 阅读(22) 评论(0) 推荐(0)
摘要: Day 0 启程! 前面忘了。 Day 1 第一天 8:12 上考场,8:27 看到 t1 误以为自己不大会做,一开始只写了 \(20pts\),此时大概是 8:45。 然后开 t2,一直理解不了题意,稍微在草稿纸上模拟了一下,理解了样例,码了一个 \(O(2^m)\) 的 \(10pts\) 做法 阅读全文
posted @ 2023-03-28 22:07 CountingGroup 阅读(83) 评论(0) 推荐(0)
摘要: https://codeforces.com/contest/1798/problems A. Showstopper 考虑将 $\max(a_i,b_i)$ 全都交换到 $b_i$,那么 $a_i$ 就是 $\min(a_i,b_i)$。 只需要判定: $$a'=[\min(a_1,b_1),\m 阅读全文
posted @ 2023-03-27 23:44 CountingGroup 阅读(95) 评论(0) 推荐(0)
摘要: https://codeforces.com/contest/1809/problems A. Garland 只需要枚举颜色种类数即可。如果颜色为 $2$ 还要枚举一下颜色分布,形如 aabb 的答案为 $4$,形如 abbb 的答案为 $6$,如果形如 aaaa 无解,否则答案均为 $4$。 # 阅读全文
posted @ 2023-03-24 22:34 CountingGroup 阅读(194) 评论(0) 推荐(1)
摘要: 题面:https://atcoder.jp/contests/arc158/tasks_print # A - +3 +5 +7 将 $+3,+5,+7$ 可以在不改变相对位置的情况下都 $-5$,即变成 $-2,+0,+2$,发现和不变,可以得出最后的数的值 $x=\dfrac{a+b+c}{3} 阅读全文
posted @ 2023-03-20 23:08 CountingGroup 阅读(74) 评论(0) 推荐(0)
摘要: # 一、理论知识 首先放一张图(明显是 OI-Wiki 的): ![](https://cdn.luogu.com.cn/upload/image_hosting/z7mua7en.png) - $u$ 的子节点 $p_1,p_2,\dots,p_k$ 中子树最大的节点叫做**重儿子**,如有多个, 阅读全文
posted @ 2023-03-20 16:46 CountingGroup 阅读(38) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9