跳到正文

题解

题目 P14849

存档题解 1 篇按获赞排序

在洛谷打开

题解

  1. 0 赞

    题解:P14849 [ICPC 2022 Yokohama R] Cake Decoration

    题意 题目给形式化了,懒得写了。 做法 我们先令四元组 (a,b,c,d) 中,a<b<c<d,当 a,b,c 确定时,当且仅当 d=lfloorX/abc⌋>c 时满足要求,证明省略。可以做到 O(X^3/4),显然是不行的。 我们只枚举 a,b,令 K=lfloorX/ab⌋…