摘要: G. Restore the Permutation A sequence of $n$ numbers is called permutation if it contains all numbers from $1$ to $n$ exactly once. For example, the s 阅读全文
posted @ 2022-11-20 16:59 onlyblues 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Number of Beautiful Partitions You are given a string s that consists of the digits '1' to '9' and two integers k and minLength. A partition of s is c 阅读全文
posted @ 2022-11-20 15:38 onlyblues 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 排队 $n$ 个小朋友排成一排,从左到右依次编号为 $1 \sim n$。 第 $i$ 个小朋友的身高为 $h_i$。 虽然队伍已经排好,但是小朋友们对此并不完全满意。 对于一个小朋友来说,如果存在其他小朋友身高比他更矮,却站在他右侧的情况,该小朋友就会感到不满。 每个小朋友的不满程度都可以量化计算 阅读全文
posted @ 2022-11-20 10:05 onlyblues 阅读(161) 评论(0) 推荐(0) 编辑
Web Analytics