摘要: 数字积木 题目描述 Bingbong 给定一棵包含 $n$ 个节点的积木树,树的节点编号为 $1 \sim n$,节点 $i$ 的权值为 $a_i$,其中 $a$ 由 $0 \sim n-1$ 的数字组成,且每个数字只出现一次。 定义树上一个连通子图的权值为:构成该连通子图的所有节点的权值中未出现过 阅读全文
posted @ 2026-02-11 23:16 onlyblues 阅读(3) 评论(0) 推荐(0)
摘要: C2. XOR-convenience (Hard Version) This is the hard version of the problem. The difference between the versions is that in this version, $1 \le i \le 阅读全文
posted @ 2026-01-25 12:21 onlyblues 阅读(11) 评论(0) 推荐(0)
摘要: Balanced 01-String 题目描述 小苯有一个长度为 $n$ 的字符串 $s$,只包含字符 $\texttt{'0'}$、$\texttt{'1'}$ 和 $\texttt{'?'}$。 他定义一个 $01$ 字符串是平衡的,当且仅当字符串中所有相邻两个字符相同的对数(即满足 $s_i 阅读全文
posted @ 2026-01-21 23:19 onlyblues 阅读(8) 评论(0) 推荐(0)
摘要: E - Cookies Problem Statement There are $10^{100}$ cookies of each of $N$ types. The deliciousness per cookie of the $i$-th type is $A_i$. You will ch 阅读全文
posted @ 2026-01-13 11:22 onlyblues 阅读(6) 评论(0) 推荐(0)
摘要: D. Interval Cubing While learning Computational Geometry, Tiny is simultaneously learning a useful data structure called segment tree or interval tree 阅读全文
posted @ 2026-01-02 23:25 onlyblues 阅读(4) 评论(0) 推荐(0)
摘要: H. Blackslex and Plants Blackslex has found solace in plants and trees amidst accumulated stress from strained relationships, stressful politics, and 阅读全文
posted @ 2025-12-28 23:35 onlyblues 阅读(26) 评论(0) 推荐(0)
摘要: F - Manhattan Christmas Tree 2 Problem Statement There are $N$ Christmas trees on a two-dimensional plane. The $i$-th $(1\le i\le N)$ Christmas tree i 阅读全文
posted @ 2025-12-22 16:21 onlyblues 阅读(13) 评论(0) 推荐(0)
摘要: 最大平均数 题目描述 给定长度为 $n$ 的整数数组 $a=(a_1,\dots,a_n)$,且每个数均为 $6$ 的倍数。对于 $1 \le i < j \le n$,定义 $f(i,j) = \max_{\, i \leq l < r \leq j} \frac{a_l + a_{l+1} + 阅读全文
posted @ 2025-12-16 23:59 onlyblues 阅读(15) 评论(0) 推荐(0)
摘要: D. Fibonacci Paths You are given a directed graph consisting of $n$ vertices and $m$ edges. Each vertex $v$ corresponds to a positive number $a_v$. Co 阅读全文
posted @ 2025-12-15 20:32 onlyblues 阅读(40) 评论(0) 推荐(0)
摘要: 公约数距 定义一个整数序列 $B=(B_1,B_2,\dots,B_k)$ 的分数为 $\sum_{i=1}^{k} \sum_{j=1}^{i-1} \gcd (B_i,B_j) \times 2^{(i-j-1)}$。 给出一个整数序列 $A=(A_1,A_2,\dots,A_N)$,求出以下问 阅读全文
posted @ 2025-12-11 20:52 onlyblues 阅读(7) 评论(0) 推荐(0)
Web Analytics