随笔分类 -  构造

constructive algorithms
摘要:题意 Codeforces Educational Codeforces Round 145 (Rated for Div. 2) C. Sum on Subarrays 给你 $n$ 和 $k$ ,要求生成一个长度为 $n$ 的数组 $a$,且他的非空正子数组的数量为 $k$ ,非空负子数组的数量 阅读全文
posted @ 2023-04-13 00:06 1v7w 阅读(61) 评论(0) 推荐(0)
摘要:题意 Codeforces Round 863 (Div. 3) E. Living Sequence 如果正整数中不能存在 $4$,那么新生成的数中的第 $k$ 个数为多少? 思路 $4$ 不能够选,也就是每一位只能选择 $0,1,2,3,5,6,7,8,9$ 。可以发现,这就是一个九进制。 当需 阅读全文
posted @ 2023-04-12 10:40 1v7w 阅读(225) 评论(0) 推荐(1)