摘要:
CF909 题解 题目链接 A B C D E F 难度:红 黄 绿 蓝 绿 紫 题解 A 题目翻译:给定两个字符串,求字典序最小的“两字符串非空前缀拼接形成的字符串”。 算法标签:贪心 题目分析: 字典序最小,即从左往右依次比较字符,直到一方不剩字符或两字符不同。因此想到贪心。由于前缀非空,因此在 阅读全文
摘要:
题面 A B C D E F 难度:红 橙 黄 蓝 紫 紫 题解 B 题目大意:找到一组分割方法,使得 \(\sum _{i=1} ^ k (\text{&} _{j=l_i} ^ {r_i} a_j)\) 取得最小值时使 \(k\) 最大,输出 \(k\)。其中 \(\text{&}\) 表示按位 阅读全文
摘要:
题面 A B C D E F G H 难度:红 橙 黄 绿 蓝 紫 黑 黑 题解 A 题目大意: 输入 \(a\),\(b\),解不等式 \(b - 2x \le a - x (0 \le x \le a)\),输出 \(a - x_{min}\)。 解题思路:移项,得 \(x \ge b - a\ 阅读全文
摘要:
Xuzhou is a place where there have been more than 50 large-scale battles from ancient times to the present day. This battleground is complicated, and 阅读全文