482
482. 密钥格式化
链接 https://leetcode.cn/problems/license-key-formatting/description/ 思路 字符串处理,没啥好说的... 代码 class Solution: def licenseKeyFormatting(self, s: str, k: int ......
CF482B Interesting Array Solution
构造一个数组,给出了 $m$ 条限制,要求 $[l, r]$ 内的数按位与的值为 $x$。 按位考虑,对于 $x$ 的每个位,$[l, r]$ 的数在这一个位下都应该是 $1$, 否则就无法满足它们的与的值为 $x$。 构造出来的数组并不一定是满足条件的。所以在所有的操作完后还要验证构造的数组是否满 ......